This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author schuppenies
Recipients amaury.forgeotdarc, schuppenies
Date 2008-08-25.20:43:44
SpamBayes Score 1.0188097e-05
Marked as misclassified No
Message-id <1219697025.92.0.458237292903.issue3680@psf.upfronthosting.co.za>
In-reply-to
Content
The dict, set, and deque iterators do not implement tp_traverse although
they reference container objects. This can lead to reference cycles
which will not be collected. The attached cycle.py script from Amaury
demonstrates the problem for dict iterators. The attached patch
addresses the issue for the above mentioned types. The method applied in
the demonstration script was used for test cases.

This is my first excursion into cyclic garbage collector
implementations, so please review carefully. Also, I am not sure about
tp_traverse for the deque type. Must the block member also be considered
or is the deque member sufficient?

Finally, do you consider this a show stopper?
History
Date User Action Args
2008-08-25 20:43:46schuppeniessetrecipients: + schuppenies, amaury.forgeotdarc
2008-08-25 20:43:45schuppeniessetmessageid: <1219697025.92.0.458237292903.issue3680@psf.upfronthosting.co.za>
2008-08-25 20:43:45schuppenieslinkissue3680 messages
2008-08-25 20:43:44schuppeniescreate