Python - Memory Leak

Posted by Dave on Stack Overflow See other posts from Stack Overflow or by Dave
Published on 2010-04-20T21:47:01Z Indexed on 2010/04/20 22:33 UTC
Read the original article Hit count: 196

Filed under:
|

I'm working on solving a memory leak in my Python application.

Here's the thing - it really only appears to happen on Windows Server 2008 (not R2) but not earlier versions of Windows, and it also doesn't look like it's happening on Linux (although I haven't done nearly as much testing on Linux).

To troubleshoot it, I set up debugging on the garbage collector:

gc.set_debug(gc.DEBUG_UNCOLLECTABLE | gc.DEBUG_INSTANCES | gc.DEBUG_OBJECTS)

Then, periodically, I log the contents of gc.garbage.

Thing is, gc.garbage is always empty, yet my memory usage goes up and up and up.

Very puzzling.

© Stack Overflow or respective owner

Related posts about python

Related posts about memory-leaks