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

Memory leak in JFrame on Linux

    XMLWordPrintable

Details

    Description

      FULL PRODUCT VERSION :
      java version " 1.7.0_06 "
      Java(TM) SE Runtime Environment (build 1.7.0_06-b24)
      Java HotSpot(TM) 64-Bit Server VM (build 23.2-b09, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Linux 2.6.32-5-amd64

      A DESCRIPTION OF THE PROBLEM :
      Creating, packing and then disposing a JFrame leaks about 40 bytes/frame.

      REGRESSION. Last worked in version 6u31

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compile test program and run it. Use jconsole to monitor memory.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      No memory leaks when running this.
      ACTUAL -
      Heap use (after GC) goes up very slowly (about 3 MB/minute on my system). It may take running this at least 10 minutes to notice the increase.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      public class FrameLeak {
      public static void main(String[] args) {
      for (int i = 0; i < 1000000000; i++) {
      doit();
      if (i % 1000 == 0) System.out.println(i);
      }
      }
      public static void doit() {
      JFrame f = new JFrame();
      f.pack();
      f.dispose();
      }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      None found.

      Attachments

        Activity

          People

            azvegint Alexander Zvegintsev
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: