Notification when reference count goes to 0?

Robert Oschler Oschler at earthlink.net
Mon Dec 23 01:37:15 EST 2002


Is there a way to get notification when the reference count goes to 0 on an
object? The only thing I miss from C++ is destructors.  If there was a way
to get notified when an object's reference count went to 0, the automatic
release of associated resources would be possible, yes?  Just to be
explicit, I'm not interested in garbage collection based finalization, as
everyone knows the timing or even the occurrence of such an event comes
under the heading of 'unspecified behavior', at least with Java it is.

thx






More information about the Python-list mailing list