Message109099
The GC module currently relies only on the presence of a __del__ method to decide if an object can be safely collected at all. Also, there is a special case for generator objects.
This patch allows any object to call an api during its traversal,
PyObject_GC_Collectable(), to indicate whether it is fit to be collected at this time, overriding any presence of a __del__ method or not.
This mechanism is being put in place in stackless python 2.7 because tasklets cannot always be collected depending on their runtime state, and I thought this might be a useful addition for regular python, especially since there already is such a dynamic special case for generator objects. |
|
Date |
User |
Action |
Args |
2010-07-02 11:30:12 | kristjan.jonsson | set | recipients:
+ kristjan.jonsson |
2010-07-02 11:30:12 | kristjan.jonsson | set | messageid: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> |
2010-07-02 11:30:10 | kristjan.jonsson | link | issue9141 messages |
2010-07-02 11:30:09 | kristjan.jonsson | create | |
|