[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Garbage collection

Simon Pickles

2/18/2008 9:45:00 PM

Hi,

I'm building a server with python, but coming from a c++ background,
garbage collection seems strange.

For instance, I have a manager looking after many objects in a dict.
When those objects are no longer needed, I use del manager[objectid],
hoping to force the garbage collector to perform the delete.

However, this doesn't trigger my overloaded __del__ destructor. Can I
simply rely on the python garbage collector to take it from here?

Is there a way to find how many references exist for an object?

Thanks

Simon

--
Linux user #458601 - http://coun....