[issue9825] OrderedDict ref cycles cause memory leak

2010-09-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: For 2.7, removed __del__ in r84725. For 3.2, replaced __del__ with weakrefs in r84727. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue9825] OrderedDict ref cycles cause memory leak

2010-09-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Éric, I've got this one. Thx. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue9825] OrderedDict ref cycles cause memory leak

2010-09-11 Thread Éric Araujo
Éric Araujo added the comment: On #python-dev, Raymond, Amaury and Benjamin agreed that __del__ should be removed, with the rationale that this method should be used to release resources other than memory. -- nosy: +eric.araujo ___ Python tracker

[issue9825] OrderedDict ref cycles cause memory leak

2010-09-10 Thread jason kirtland
jason kirtland added the comment: I find the behavior surprising compared to dict and other containers, where this is not an issue and weakrefs are not required in user code. I would not be surprised, however, to have to wait for a gc.collect() to clean up my cycles like I do for regular obj

[issue9825] OrderedDict ref cycles cause memory leak

2010-09-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is an unfortunate aspect of using __del__. I don't see a way around it without reintroducing weak references. Of course, your code can also use weak ref proxies to avoid creating uncollectible circular garbage. -- priority: normal -> low _

[issue9825] OrderedDict ref cycles cause memory leak

2010-09-10 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue9825] OrderedDict ref cycles cause memory leak

2010-09-10 Thread jason kirtland
New submission from jason kirtland : Circular graphs of collections.OrderedDict are uncollectable due to the presence of OrderedDict.__del__. >>> from collections import OrderedDict >>> import gc >>> left, right = OrderedDict(), OrderedDict() >>> left['other'] = right >>> right['other'] = left