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

8.0-b73: Creating and removing TreeView with static TreeItems leaks memory

    XMLWordPrintable

Details

    Description

      Creating and removing TreeView with static TreeItems leaks memory.
      The issue started to appear from build 8.0-b73, no issue in previous
      build 8.0-b72.

      Steps to reproduce:
      > java -Xmx64m -cp "JFX_ROOT/rt/lib/jfxrt.jar" TreeViewMemTest -mode static

      No memory leak in case new TreeItem instances are created on each pulse:
      > java -Xmx64m -cp "JFX_ROOT/rt/lib/jfxrt.jar" TreeViewMemTest -mode dynamic


      The memory leak happens because TreeViews objects are not deleted.
      The references to them are hold from
       staticTreeRoot -> expanded -> helper -> invalidationListeners

      To see more details run the test with -XX:+HeapDumpOnOutOfMemoryError and
      then analyze hprof file (you can use Eclipse memory analyzer for example).

      Attachments

        Activity

          People

            jgiles Jonathan Giles
            epavlova Ekaterina Pavlova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported: