poss solution: GC and __del__ cycles

Neil Schemenauer nascheme at enme.ucalgary.ca
Fri Sep 15 08:39:40 EDT 2000


Ken MacLeod <ken at bitsko.slc.ut.us> wrote:
>The possible solution depends on the module author knowing the
>reason for having explicit destructors, and providing a special
>one that the GC can use to destroy the cycles.

Can someone give me a real example of when you need to do
something like this?  I can't think of a case where the __del__
method couldn't be factored out into a separate class with the
resource needing finalization.  Let's make sure there is a real
problem to solve here before adding complexity to the language.

  Neil



More information about the Python-list mailing list