[issue8212] A tp_dealloc of a subclassed class cannot resurrect an object

Kristján Valur Jónsson report at bugs.python.org
Mon Apr 16 23:59:43 CEST 2012


Kristján Valur Jónsson <kristjan at ccpgames.com> added the comment:

__del__ methods are never invoked from GC.  All objects that have finalizers, and all objects reachable from them _must_ be put in gc.garbage.
If I'm not mistaken, this is a fundamental rule of python's gc module and it is not because of the unknown order of finalizers as some people seem to think, but because the state of the interpreter during the collection phase is so fragile, with objects being linked up in various lists, and so on, that it isn't permissable to run any dynamic code.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8212>
_______________________________________


More information about the Python-bugs-list mailing list