Skip to content

Memory leak with static iterator types #91632

Closed
@kumaraditya303

Description

Python does not finalizes iterators of some types at exit leading to memory leak.

Reproducer:

a = type(iter(tuple[int]))
print(a.mro())

Leak:

[<class 'generic_alias_iterator'>, <class 'object'>]
[119 refs, 46 blocks]

See also #90575

Metadata

Assignees

Labels

3.11only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)topic-C-API

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions