-
-
Notifications
You must be signed in to change notification settings - Fork 72
Description
I recently experienced a manifestation of https://bugs.python.org/issue39061 which I had worked around by running a full collection (gc.collect()) at regular intervals. I started using objgraph to try to find the source of the "leak" (the reference cycle) which moved and accumulated objects in the generation 2 collection which also made the issue disappear, just as my regular garbage collection was. I thus assumed that objgraph was calling gc.collect() and indeed it was.
I commented out the call to gc.collect() in growth which allowed me to identify the reference cycle which I could fix using weakrefs.
I would like to propose a new option to the growth/show_growth functions to disable the automatic full collection. Maybe running a generation 1 collection or none at all even if it means that there would be more false positive showing up in the growth report.
This is a proposition and I will gladly do the change if it sounds like it would be useful.
By the way, objgraph has helped me more than once at this point. Thank you very much.