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

Indeterminate progress bar causes memory leak

XMLWordPrintable

      This issue is a backport of https://javafx-jira.kenai.com/browse/RT-30871:

      Demonstrated using Java 7u15 and 7u21.

      An indeterminate progress bar in JavaFX will cause a memory leak for any window on which it is contained.

      The only workaround appears to be to set the progress to a value >= 0 before closing the window.


      Steps to demonstrate the issue:
      1) Launch the application, observe the Swing window.
      2) Click the "GC" button to get a baseline memory reading.
      3) Click the "Open JavaFX Window" THREE times, observing the JavaFX windows that open.
      4) Observe that the used memory reading has increased by about 15 megabytes, as expected.
      5) Close all of the JavaFX windows.
      6) Click the "GC" button again, and observe that the memory does not go back to a reasonable number (close to the baseline). If you observe this object inside of a memory profiler, you can see that the all of the byte[] objects are still strong-reachable. This is because the progress bar is in an indeterminate state.

            anashaty Anton Nashatyrev (Inactive)
            anashaty Anton Nashatyrev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: