Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

I'm unclear whether you're reporting a true leak (one that can't be cleaned-up 
by a call to gc.collect()) or just a garden variety circular reference that 
will eventually free, just not as quickly as it would with straight reference 
counting applied when there are no circular references.

FWIW, there wasn't a backport because the latter case wasn't deemed to be bug.  
Circular references are allowed -- we just wait on GC to clean them up.  

Another consideration was that the weakref proxy alternative was much slower 
than the existing code (that mattered less in Python 3 where we have a C 
implementation of OrderedDict, giving more freedom for the pure python version 
to adopt a less performant but more memory friendly alternative).  There is a 
little more history here as well.  There used to be a __del__() method to 
accelerate the reclamation of memory but that was slow and it occasionally 
caused other problems such as the creation of an unreclaimable zombie object.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35030>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to