Hunting a memory leak

Will Ware wware at
Mon Sep 1 18:23:48 CEST 2003

Debian User wrote:
> I'm trying to discover a memory leak on a program of mine...

Several years ago, I came up with a memory leak detector that I used for
C extensions with Python 1.5.2. This was before there were gc.* methods
available, and I'm guessing they probably do roughly the same things.
Still, in the unlikely event it's helpful:

Now that I think of it, this might be helpful after all. With this
approach, you're checking the total refcount at various points in the
loop in your C code, rather than only in the Python code. Take a look

Good luck
Will Ware

More information about the Python-list mailing list