https://issues.apache.org/bugzilla/show_bug.cgi?id=46811
--- Comment #2 from Cristi Moise <[email protected]> 2009-03-06 04:18:08 PST --- > Could you please attach a test case? I haven't investigated this properly, but > being able to reproduce usually helps a lot. ;-) A possible test case would look like this: Element[] animatedElements = new Element[100]; while(true){ //start 100 animations for(int i=0;i<100;i++){ //create the element to be animated Element animatedElement = document.createElementNS("http://www.w3.org/2000/svg", "rect"); animatedElement.setAttributeNS(null, "x", "0"); animatedElement.setAttributeNS(null, "y", "0"); animatedElement.setAttributeNS(null, "width", "100"); animatedElement.setAttributeNS(null, "height", "100"); animatedElement.setAttributeNS(null, "style", "fill:red"); // add animation to the animatedElement Element animation = document.createElementNS("http://www.w3.org/2000/svg", "animateMotion"); animation.setAttributeNS(null, "begin", "indefinite"); animation.setAttributeNS(null, "dur", "1s"); animation.setAttributeNS(null, "fill", "freeze"); animation.setAttributeNS(null, "path", "M 0 0 L 100 100"); // add animation to animatedElement animatedElement.appendChild(animation); // add the animated element to the document ((SVGDocument) document).getRootElement().appendChild(animatedElement); // start the animation now ((ElementTimeControl) animation).beginElement(); //remember the animated element so that we can later remove it animatedElements[i]=animatedElement; } Thread.sleep(10); //remove the above created 100 animated elements for(int i=0;i<100;i++){ //remove animated element, this also removes the animation animatedElements[i].getParentNode().removeChild(animatedElements[i]); } } > Stating which file was modified would avoid a find in files... :-P I did mention the name of the class AnimationEngine, sorry I didn't put it so that it's easier to see, it's the first time I submit a bug, ever as far as I can remember. > Bug 46155 and bug 46124 may also be related with this -- may this be a > regression from those changes?... I really don't know the details of batik developement or how things work in this complex library, I just profiled and found the place the memory leak happened and fixed the sources, I don't know if it's a good solution. Just needed a quick fix four our application, and tought to help you out a little to improve the libs. Best regards, Cristi. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
