Logging in __del__()

Vinay Sajip vinay_sajip at yahoo.co.uk
Tue Jul 15 09:56:15 EDT 2008


On Jul 15, 1:51 pm, "Robert Rawlins"
<robert.rawl... at thinkbluemedia.co.uk> wrote:
>
> Am I right in thinking that Python destroys instances of classes when it
> deems they are no longer needed? I shouldn't have to explicitly delete the
> classes, right?

Python uses reference counting with a cycle detector, but the
detector's behaviour is different if there are finalizers  (__del__) -
see

http://www.python.org/doc/ext/refcounts.html

Regards,

Vinay Sajip



More information about the Python-list mailing list