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

Kristján Valur Jónsson report at bugs.python.org
Sun Jul 4 19:11:05 CEST 2010


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

I'm confused, Antoine. _I_ am not preferring anything.  I am not modifying the way finalizers are called.  I'm merely providing a way for objects to signal that they _have_ (or don't have) non-trivial finalizers.

A finalizer _may_ be tp_del, but it may be any code that is called as part of tp_dealloc().  This patch allows an object to say:  Calling tp_dealloc() is currently unsafe from a gc.collect() run.

----------

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


More information about the Python-bugs-list mailing list