destructors -- when are they called?

Thomas Wouters thomas at xs4all.net
Tue May 30 13:28:04 CEST 2000


On Tue, May 30, 2000 at 08:41:55AM +0000, Fredrik Lundh wrote:
> Courageous wrote:

> > Actually both of these are interesting data points. So what
> > you're saying is that code functionality which relies on a
> > 0 object reference calling the destructor will work 100% of
> > the time now, but might break in the future.

> don't confuse the CPython implementation with the language.

[..]

> but the language specification deals with things on the Python
> level, and Python doesn't really require reference counting.

As shown in JPython, which *doesn't* use reference counting, and indeed
behaves entirely different with regards to destructors. Then again, you
can't import your C extension in JPython anyway.

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list