[Python-3000] PEP: Eliminate del (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Sun May 6 01:14:30 CEST 2007
- Previous message: [Python-3000] PEP: Eliminate __del__
- Next message: [Python-3000] PEP: Eliminate __del__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Giovanni Bajo wrote:
Uh? If dict contains a cycle back to the original object, then the object is part of a cycle already, with or without getting an additional reference to the dict within the finalization callback.
Yes, but storing a finalizer in a global registry that references the dict makes it an immortal cycle, because the GC won't see it as an isolated cycle that's not referenced from outside.
And if there's no cycle, you're not creating one by just referencing dict.
It's not creation of the cycle that's the issue, it's keeping it alive forever once it's created.
-- Greg
- Previous message: [Python-3000] PEP: Eliminate __del__
- Next message: [Python-3000] PEP: Eliminate __del__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]