Have you ever wondering what is in the gabarge collector ? This little piece
of code may help :)
import string,gc def debugGC(threshold=10): d = {} print "*" * 80 for o in gc.get_objects(): try: s = str(o.__class__) try: d[s] = d[s] + 1 except KeyError: d[s] = 1 except AttributeError: pass # this is not a str_able object l = d.keys() l.sort() for key in l: if d[key] > threshold: print "%70s -> %d " % (key,d[key]) print "*" * 80
im model