xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mbishop <mark.bis...@cse-servelec.com>
Subject Possible Memory Leak issue with addEventListener
Date Thu, 26 Apr 2012 08:27:01 GMT
I have an application which uses batik to render interactive mimics.  I've
noticed a significant memory leak in JSVGCanvas which occurs whenever I have
used event listeners inside script within SVG.

I remove all listeners before disposing the canvas but this has no affect.

Having been unsuccessful to find a solution on the web, I'm posting a simple
example here in the hope someone might be able to either point me in the
right direction on how to use these listeners or confirm that I may have
discovered a bug in batik.

My example App is as follows:



The SVG document mem_leak.svg it requires is below



To perform the test, run the app, click the "No Events" button three times
and close each window that appears.  Use JVisualVM (or something similar) to
check instances of JSVGCanvas.

Repeat the test by pressing the "With Events" button three times and closing
each window.  Notice that JSVGCanvas doesn't dispose correctly after events
were used.


--
View this message in context: http://batik.2283329.n4.nabble.com/Possible-Memory-Leak-issue-with-addEventListener-tp4589198p4589198.html
Sent from the Batik - Users mailing list archive at Nabble.com.

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


Mime
View raw message