Python 2.0

Vadim Chugunov chega_ at yahoo.com
Tue Jun 1 01:49:46 EDT 1999


> Remember the original statement is like this:
>
> >As many people have noted before, you would not be able to use
> >destructors to free up resources like memory or file descriptors.
>
>which, as I understand, means destructors can not be used with real
>GC.  That's just not true.

I'm sorry for being unclear, but the key words here were: "to free up
resources".
And I meant "to free up resources the moment I expect them to", not "some time
later".

BTW, this is a common expectation from anyone coming from a C++ background.
In C++, deallocation in destructors is the only way you can use exceptions
without leaking resources.

Vadim







More information about the Python-list mailing list