Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5052169

memory leak triggered by use of Component$NativeInLightFixer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 5.0
    • client-libs
    • None
    • b08
    • generic
    • solaris_7
    • Verified

      The following test case causes the JVM to run out of Java heap space.
      One leak seems to involve the use of NativeInLightFixer. The test
      is constructed to cause Component.removeNotify() calls but not
      NativeInLightFixer.componentRemoved() calls.

      ----

      import java.awt.*;

      public class Fixer {
          static public void main(String args[]) {
              Frame fr = new Frame("Test Frame");
              Window win = new Window(fr);
              win.show();

              Panel panel = new Panel();

              Component c1 = new Canvas();

              Container c0 = new Container();
              panel.add(c0);
              c0.add(c1);

              while (true) {
                  win.add(panel);
                  win.remove(panel);
              }
          }
      }

      ----

      The problem shows up under 1.5, 1.4.2, 1.3.1, and 1.2.2.

      ###@###.### 2004-05-24

            art Artem Ananiev (Inactive)
            dlong Dean Long
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: