D
David Turner
Marcin 'Qrczak' Kowalczyk said:It's not statically known which variables hold objects which define __del__.
This implies that you must walk over all local variables of all function
activations, in addition to GC overhead, and you must manage reference
counts in all assignments. I'm afraid it's unacceptable.
You don't need static knowledge of which names refer to deterministic
objects. You only need to know at three points: when binding a name,
when exiting a function scope, and when calling __del__ on an object.
In all three cases, you have immediate access to a list of objects
that are to be unreferenced.
So what's the problem? The vast majority of objects I suspect will
not have __del__ methods, so the reference counting that has to be
performed is minimal.
Regards
David Turner