destructors -- when are they called?

Mark Hammond mhammond at skippinet.com.au
Tue May 30 02:24:03 EDT 2000


This should be quite obvious from the Py_DECREF macro - it explicitely
calls the delete function when the ref count hits zero.  In the current
implementation, it is indeed guaranteed (even though the language spec
specifically refuses to guarantee it)

Mark.

"Courageous" <jkraska1 at san.rr.com> wrote in message
news:393351D2.3533AEFF at san.rr.com...
>
>
> When writing a C language extension, is it guaranteed that the
> moment your object's reference count is reduced to zero it's
> destructor will be called? (I have a situation in which this
> may matter).
>
>
> C/





More information about the Python-list mailing list