Message109099
| Author |
kristjan.jonsson |
| Recipients |
kristjan.jonsson |
| Date |
2010年07月02日.11:30:07 |
| SpamBayes Score |
0.0049556354 |
| Marked as misclassified |
No |
| Message-id |
<1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|