[issue9141] Allow objects to decide if they can be collected by GC
report at bugs.python.org
Tue Apr 17 13:08:39 CEST 2012
Antoine Pitrou <pitrou at free.fr> added the comment:
> Look again. gcmodule specifically takes any objects reachable from
> ob_clear and sees if any of them have side effects when Py_DECREF'd.
has_finalizer() in gcmodule.c doesn't check for weakref callbacks, so a
weakref callback can still be invoked from tp_dealloc.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list