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

JSVGCanvas has memory leak problem when resizing the component

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Resolution: Unresolved
    • 1.8
    • None
    • SVGGraphics2D
    • 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);
      }

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: