I have a bug in my program that is generating a lot of String
instances (7000+ in Heap according to VisualVM
). I am trying to isolate which class is responsible for this so I can understand why it is happening.
The following is an example of the heap dump for String
:
How do I figure out which class is responsible for generating each of the String
? I am working with about 40 classes together so I would like to be able to identify the culprit class through VisualVM
if possible.