How to analyze heap data from .hprof file and use it to reduce memory leaks?
<p>In recent times, I have encountered <code>java.lang.OutOfMemoryError</code> exception while running an application.</p>

<p>During one such instance, I was able to get the heap dump using <code>jvisualvm</code>.</p>

<p>I am able to open the <code>.hprof</code> heap dump file obtained from the heap dump using <code>NetBeans 8.1</code> IDE but I am not aware of how to analyze the data dump. I'd like to know how to read the dump file and take corrective actions to reduce the out of memory exception from an application perspective. </p>