I'm trying to diagnose memory leaks caused by Exceptions.traceback and I would like to be able to list all or most of the paths that leads to the variable that should be garbage collected but isn't.
I'm currently using a bit clumsy code to print out the reference graph, but I hoped there is a library or tool that have this ability build in. Ideally with some nice way to dump the graph and then explore it later interactively.
You can see my current approach (functions print_ref_graph and find_tracebacks), here: https://nbviewer.org/gist/PiotrCzapla/1ff0fa083e8a4ca657ad86b1942abf42