Embedding Python - Deleting a class instance

Bue Krogh Vedel-Larsen hesterumpe at tiscali.dk
Tue Jun 21 15:15:08 CEST 2005


Jeff Epler <jepler at unpythonic.net> wrote in
news:mailman.698.1119357219.10512.python-list at python.org: 

> 
> Unless there's a cycle and GC gets involved, all there is to deleting
> *anything* in Python is correctly managing the refcount.  On the other
> hand, you can never free an object while it is still reachable.  Some
> local name "x" may never spontaneously lose the thing it refers to.

Thanks for the replies. I've solved it, it was a kind of cycle: When 
creating the instance it registered itself with my code, and was supposed 
to unregister itself when deleted, but since I kept a copy of the object in 
the program it never got unregistered, and thus never deleted...



More information about the Python-list mailing list