Message187413
I wonder if it would be better to reword the garbage collection docs to mention that Python can't collect objects if they are part of a reference cycle, and some of the objects in the reference cycle need to run code at gc time. Then mention that such objects include objects with __del__ and also generators if they do have some other blocks than loops in them (for example try or with blocks).
To me it seems this issue could be mitigated somewhat by collecting the objects if there is just one object with finalizer code in the cycle. It should be safe to run the single finalizer, then collect the whole cycle, right? |
|
Date |
User |
Action |
Args |
2013-04-20 09:44:53 | Anssi.Kääriäinen | set | recipients:
+ Anssi.Kääriäinen, amaury.forgeotdarc, ncoghlan, pitrou, vstinner, benjamin.peterson, docs@python, pconnell, isoschiz |
2013-04-20 09:44:53 | Anssi.Kääriäinen | set | messageid: <1366451093.72.0.532401371988.issue17468@psf.upfronthosting.co.za> |
2013-04-20 09:44:53 | Anssi.Kääriäinen | link | issue17468 messages |
2013-04-20 09:44:53 | Anssi.Kääriäinen | create | |
|