Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

Tracing the references for a specific object in Python (memory leak)

$
0
0

I have a 3rd party library creating huge memory leaks. I've called gc.collect, and have no references to any objects created by this library, but it still leaks.

Using gc.get_objects() I've identified numerous objects which should not be alive, as they are specific to this library.

How can I trace which objects are keeping these leaked objects alive (the goal being to trace it to a global variable/list, which I can reset to fix the leak)?

Files and line numbers would be nice, but even having the instances of the holder objects would help a great deal.


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>