title: Understanding the Surviving Generations Metric
body: <p>Netbeans' memory monitoring tool (which is the same tool as VisualVm) has an interesting metric for tracking memory leaks : the Surviving Generations Metric.</p>
  
  <p>A <a href="https://blogs.oracle.com/nbprofiler/entry/what_do_the_surviving_generations" rel="nofollow noreferrer">definition of this metric</a> can be found on oracle.com :</p>
  
  <ul>
  <li>a Generation is a set of instances created within the same GC interval (between two garbage collections)</li>
  <li>a Surviving Generation is a Generation that survives at least one garbage collection. The number of survived garbage collections - the generation's age - is its unique identifier</li>
  <li>Surviving Generations (metrics) value is the number of different Surviving Generations that are currently alive on the heap (number of Generations with different generation ages)</li>
  </ul>
  
  <p>I have a question about the second definition. I know what it means for an <strong>instance</strong> to survive a garbage collection. But I'm not sure what it means for a <strong>generation</strong> to survive a garbage collection. Does it mean that <em>at least one</em> instance of the generation survives the garbage collection ?</p>