jerf at jerf.org
Tue Sep 7 20:12:55 CEST 2004
On Tue, 07 Sep 2004 20:00:58 +0200, Diez B. Roggisch wrote:
> I'm in the process of debugging a mem-leaking app. A recent thread here on
> c.l.py mentioned the use of the gc module, so I gave it a try.
> However, using get_referrers() yields in literally thousands of objects for
> even the tiniest example like this:
> import gc
> a = 
> print gc.get_referrers(1)
For space reasons, small ints are re-used. You get thousands of referrers
to the number 1 because, well, there are!
a = 
and you'll get something much more reasonable:
[(None, 4444444444444L), [4444444444444L]]
More information about the Python-list