title: How to determine where an object was instantiated in VisualVM Heap Dump
body: <p>I have a bug in my program that is generating a lot of <code>String</code> instances (7000+ in Heap according to <code>VisualVM</code>). I am trying to isolate which class is responsible for this so I can understand why it is happening.</p>
  
  <p>The following is an example of the heap dump for <code>String</code>:</p>
  
  <p><img src="https://i.stack.imgur.com/Wta8z.png" alt="enter image description here"></p>
  
  <p>How do I figure out which class is responsible for generating each of the <code>String</code>? I am working with about 40 classes together so I would like to be able to identify the culprit class through <code>VisualVM</code> if possible.</p>