Hi Praveen,
Praveen Nayak2 <[email protected]> wrote on 10/28/2009 02:46:10 AM:
> I have many pages each with an applet in it, with the SVG diagram,
> and users can switch between these pages, sometimes quite rapidly. I
> noticed there was memory leaking away. I then included a call to
> stopProcessing, which improved things. So I now have
> canvas.dispose();
> canvas.stopProcessing();
I don't think this is a good sequence. I would stop at
canvas.dispose(). The call to 'stopProcessing()' is actually
likely acting to prevent the action of canvas.dispose().
I've seen Swing hold onto the canvas much longer than
desirable because it was the 'focus' component when it was
not replaced by a new focus component. So you might try
removing the canvas from the applet and adding a JButton in
it's place.
> 1. Is this sufficient?
>
> Also, at times during navigation, I see errors such as these logged
> in the console (I believe if I navigate away before the SVG is
rendered):
> java.lang.NullPointerException
These may be caused by your calling stopProcessing.