does python have useless destructors?

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Sun Jun 13 15:43:30 CEST 2004


On Sun, 13 Jun 2004 05:00:55 -0700, David Turner wrote:

> I'm also not talking about modifying the garbage collector (if any).
> I'm talking about a mechanism that is *independent* of the garbage
> collector.  To briefly resummarize:
> 
> Objects with a __del__ method shall be reference counted.  When the
> reference count reaches zero, the __del__ method shall be called, and
> any subobjects that have a __del__ method shall also be unreferenced.

This is unimplementable without a CPU overhead equivalent to maintaining
reference counts for all objects.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/




More information about the Python-list mailing list