Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-693

JSVGCanvas has memory leak problem when resizing the component

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.8
    • Fix Version/s: None
    • Component/s: SVGGraphics2D
    • Labels:
      None
    • Environment:
      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);
      }

        Attachments

          Activity

            People

            • Assignee:
              batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
              Reporter:
              bulutoprak@hotmail.com Burak
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: