[PD] Re: pyext close
Thomas Grill
gr at grrrr.org
Fri Mar 3 02:03:43 CET 2006
Hi Frank,
> How does thie pyext._del relate to the more general __del__ method? Is
> it save to use the latter? I know, that __del__ also is called on
> delete, but I guess, using _del could be a cleaner solution?
__del__ is called when the reference count of a Python object goes to
zero and the object is destroyed by the garbage collector.
With pyext i encountered circumstances where __del__ was delayed or
never called (e.g. on reload), although i didn't find a memory leak.
That's why i introduced an explicit call of a _del method. Normally
__del__ will also be called afterwards, but you can never be sure....
greetings,
Thomas
More information about the Pd-list
mailing list