Details
-
Bug
-
Status: Open
-
Resolution: Unresolved
-
1.8
-
None
-
None
-
Operating System: Windows 2000
Platform: HP
Description
Continuously resizing the size of the canvas is causing the memory to be leaked.
Calling garbage collector does not fix the problem. To see the effect of memory
leak, continously call the setSize method of the canvas and let the size grow.
For example: call increaseSize many times and decrease size. Each time memory
increases. Calling garbage collector reduces a little but in total always memory
is increasing. Note that you should test the code with a large svg document so
that you can see the effect more quickly.
increaseSize()
{
Dimension size = svgCanvas.getSize();
size.width*= 1.3;
size.height*= 1.3;
svgCanvas.setSize(size);
}
decreaseSize()
{
Dimension size = svgCanvas.getSize();
size.width/= 1.3;
size.height/= 1.3;
svgCanvas.setSize(size);
}