Hi Zaman,

Khurram Zaman <[email protected]> wrote on 10/20/2009 02:30:12 AM:

> I am attching two snaps taken after prifiling the memory. They 
> mention some objects which are not de-allocated. The objects which 
> have positive difference are leaked. 

     So I'm not sure the graphs are telling you what you think
they are telling you (or perhaps I misunderstand the tool).  Since 
Java uses Garbage collection all the 'positive difference' tells 
you is that new objects were allocated, and the old objects haven't
been GC'ed yet. 

     In the case of the GVTGlyphMetrics this is expected, even the
number allocated is about what I would expect since it roughly
doubled the number of instances, which would simply indicate
that essentially all of the characters in the SVG changed.

     Finding memory leaks in Java usually requires making the 
problem clear through this 'noise'.  Typically this requires
causing the leaking event occur many, many times.  Then checking
object counts and notice objects that have 'accumulated' extra
instances, then when these 'bad' instances out number the 
good instances you can start looking at the reference
chains to figure out what is keeping the bad instances live.

Reply via email to