xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: Releasing memory used by SVG Document
Date Fri, 01 Dec 2006 11:14:35 GMT
Hi Paddy,

paddy <patrick_arnould@hotmail.co.uk> wrote on 11/30/2006 10:46:28 AM:

> However it seems to have a huge memory leak in that everytime i click on 
> tab and thus draw a new document the heap memory being used goes up by 
> I have narrowed it down to the drawing of the new document and i believe 
> is not releasing the memory of the old one.

   Are you drawing the new document in the same canvas as the old 

> I have read about removing the event listeners but dont know how to do 
> Has anyone got a fixed process which outlines what needs to be nulled 
> when deleting a document?

   Unless you have attached your own listeners to the DOM
(EventTarget.addEventListener), you don't need to remove anything.
The Canvas/Batik will drop all of it's internal references to the 
old document when you load a new document.  However since you
mention 'tabs' I wonder if you don't end up with a Canvas under
each tab.  In which case you will need to remove the Canvas from
the other tabs (or set the displayed document to 'null').

To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org

View raw message