First, all of you, answering me, thank you very much for what I had in mind at the weekend:
for ech in globals(): if str(type(globals()[ech])).find('instance') != -1: if ( globals()[ech].__dict__.has_key('onoma')): print "%s, %s, %s"%( ech, globals()[ech].__dict__, id(globals()[ech]) )
who did this work, although I don’t know if this good or bad approach is suitable (“onma” is the Greek word for the name). I read in Python docs about: _id2obj_dict = weakref.WeakValueDictionary () from weakref. And I shot too. Good approach and similar to Ned and Ninyagetsk, I think. But in this case, how can I be sure that the object is completely freed from memory?
source share