I’m not sure how useful this would be, but I thought it might be neat to visualize the objects being used in my program and which objects are being referenced from where. I’m guessing it would generate some data that would be used by a program like graphviz. Are there any tools that do this, otherwise how hard would it be to do this myself? Ideally this would work for any arbitrary program, though if necessary I could make some modifications to the code (such as to add a dumpObjects() call or whatever)
I’m interested in doing this for java, but if there are solutions for other languages please post those too.
A profiler would allow you to see what objects are created at runtime. This is the output of JProfiler for instance:
(source: ej-technologies.com)