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

Antoine Pitrou report at bugs.python.org
Tue Apr 17 19:58:16 CEST 2012


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

> On Tue, Apr 17, 2012 at 4:08 AM, Antoine Pitrou <report at bugs.python.org> wrote:
> > has_finalizer() in gcmodule.c doesn't check for weakref callbacks, so a
> > weakref callback can still be invoked from tp_dealloc.
> 
> Unless I'm mistaken, weakrefs will be handled and removed by
> handle_weakrefs() before delete_garbage() is called.

Perhaps, but what does that change?

----------

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


More information about the Python-bugs-list mailing list