DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=41988>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41988 ------- Additional Comments From [EMAIL PROTECTED] 2007-04-23 13:11 ------- I've done some further investigation... 1. This leak appears to be related to <text> nodes; <text> nodes are being referenced in the heap even after they are removed from the DOM. 2. Heap inspection reveals that a zillions of SVGTextElementBridge nodes are lying around, still registered as EventListeners on the DOM. 3. When the <text> node is directly removed from the DOM, no memory leak appears to occur. However, when the parent of a <text> node is removed from the DOM, the memory leak does occur. In SVGTextElementBridge.java, the removeTextEventListeners() method must be called when the node is removed from the DOM to avoid a memory leak. This method is only ever called from handleDOMNodeRemovedEvent() (in same class). Curent theory: handleDOMNodeRemovedEvent() is being properly called when the <text> node is the node being removed, but not when the <text> node is a descendant of the node being removed. Here is the smallest input file that exhibits the bug when run with the DOMScrambler program: <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200" viewBox="0 0 200 200"><g><g><text/></g></g></svg> Note the two nested <g> elements. If you remove one of the <g> elements, the leak does not occur (which is what led me to conclusion #3 above). The above test input will take a long time to run out of memory. If you put a bunch of actual text inside the <text> node then the leak will happen much faster (as expected). -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]