[issue9141] Allow objects to decide if they can be collected by GC

Antoine Pitrou report at bugs.python.org
Sun Jul 4 17:34:27 CEST 2010

Antoine Pitrou <pitrou at free.fr> added the comment:

> GC only cares that during the final release of any objects in a
> reference cycle, no non-trivial code may run (for various technical
> reasons).  So, objects deemed "sensitive" in this way, are left alone
> (and put in gc.garbage instead).

Which is really the problem, and why you should prefer tp_dealloc over
(unless you want gc.garbage to fill up too easily)


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list