[issue42536] Iterating on a zip keeps objects alive longer than expected (test_itertools leaks sometimes references)
Pablo Galindo Salgado
report at bugs.python.org
Thu Dec 3 15:34:37 EST 2020
Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:
> The GC visit may happen when the refcount of the result tuple is > 1, but it may drop back to 1 before __next__ called again
Good point. Also, is it possible that a more complex cycle ends having more than one reference to that result, so indeed that is not enough.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42536>
_______________________________________
More information about the Python-bugs-list
mailing list