[Tutor] special call for deleted objects?
Alan Gauld
alan.gauld at blueyonder.co.uk
Fri Jan 30 03:31:00 EST 2004
> I've got a list of class instances, and under certain conditions, I
want to
> replace them with None. However, these instances should do some
cleanup
> before they dissapear.
I seem to recall there is a __del__ method you can add to your class.
It doesn't get called until the class is actually garbage collected
however so the behaviour is a little unpredictable.
Alan G.
More information about the Tutor
mailing list