[issue35502] Memory leak in xml.etree.ElementTree.iterparse

Serhiy Storchaka report at bugs.python.org
Tue Dec 18 06:53:29 EST 2018


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

It is not easy to avoid reference cycles if use a generator function. And generator function is much faster than an implementation as a class with the __next__ method. We need to access the iterator object from the code of the generator function, and this creates a cycle.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35502>
_______________________________________


More information about the Python-bugs-list mailing list