does python have useless destructors?

David Turner dkturner at telkomsa.net
Mon Jun 14 10:56:55 EDT 2004


Marcin 'Qrczak' Kowalczyk <qrczak at knm.org.pl> wrote in message news:<pan.2004.06.14.08.52.45.789476 at knm.org.pl>...
> On Mon, 14 Jun 2004 00:05:45 -0700, David Turner wrote:
> 
> It doesn't help that only some objects must have reference counts changed,
> because you statically don't know which are these, so you must check all
> potential objects anyway.

That's true, but the check could be cached so that all it would amount
to is a single test-and-branch.  The crucial difference is that
there's no need to acquire a mutex.

Regards
David Turner



More information about the Python-list mailing list