Netbeans' memory monitoring tool (which is the same tool as VisualVm) has an interesting metric for tracking memory leaks : the Surviving Generations Metric.
A definition of this metric can be found on oracle.com :
I have a question about the second definition. I know what it means for an instance to survive a garbage collection. But I'm not sure what it means for a generation to survive a garbage collection. Does it mean that at least one instance of the generation survives the garbage collection ?
Yes. Basically that means, that among the instances, that were created between garbage collection X and X+1, there are some, that are alive now, when more garbage collections have occurred.
In my opinion, all three definitions make sense only per class. I mean, "Surviving Generations (metrics) value" of the given class is the number of different Generations of this class that are now alive on the heap.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With