[Python-Dev] Cycle collection enhancement idea (original) (raw)
eyal.lotem+pyutils@gmail.com eyal.lotem at gmail.com
Sun Jun 29 16:12:40 CEST 2008
- Previous message: [Python-Dev] Cycle collection enhancement idea
- Next message: [Python-Dev] Cycle collection enhancement idea
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Jun 29, 3:36 pm, Antoine Pitrou <solip... at pitrou.net> wrote:
eyal.lotem+pyutils gmail.com <eyal.lotem gmail.com> writes:
> That would be no worse than what happens now - but its still not > perfect (del ordering issues). Also, you would need to temporarily > revive the cycles as mentioned above (to avoid accessibility of > partially destructed objects). The idea is to call all del's before any object in the cycle is deallocated (that is, call them manually rather than as part of deallocating them). That way you shouldn't have the issues mentioned above.
Firstly, as I said above: you will still have del ordering issues. Secondly, the destructor itself currently calls del, so if you call del before any deallocation, it will get called again as part of the deallocation. Might be a technicality but it will still probably require some code restructuring to work around (or making that code even more hairy).
Python-Dev mailing list Python-... at python.orghttp://mail.python.org/mailman/listinfo/python-dev Unsubscribe:http://mail.python.org/mailman/options/python-dev/python-dev2-garchiv...
- Previous message: [Python-Dev] Cycle collection enhancement idea
- Next message: [Python-Dev] Cycle collection enhancement idea
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]