New submission from Robert Schuppenies <[EMAIL PROTECTED]>: 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? ---------- components: Interpreter Core files: cycle.py keywords: patch messages: 71955 nosy: amaury.forgeotdarc, schuppenies severity: normal status: open title: Cycles with some iterator are leaking. versions: Python 2.6, Python 3.0 Added file: http://bugs.python.org/file11254/cycle.py _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3680> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com