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

com.sun.glass.ui.mac.MacView are not garbage collected



      com.sun.glass.ui.mac.MacView created by every new Stage/Scene
      are not release. As result the references to Stage/Scene and their
      objects are also kept alive.

      This leads to constant memory usage growth in performance benchmark as they create
      new Stage/Scene on every new iteration. You can see fx2.0.2-b02 memory usage results on mac here:

      Note, there are no such problems on Windows. Stage/Scene objects are garbage collected by the end of each
      performance test iteration. We also call System.gc() couple of times at the end of each iteration and as result
      all unreachable objects (at least by strong references) are supposed to be collected. The fact MacView
      objects are not collected means there are strong references to them. Memory heap analyzer doesn't allow
      to see them as they are referenced from some native objects.

      I used guimark2.BitmapBenchmark to reproduce the issue. I have stopped the benchmark after 3rd iteration,
      created heap dump, then stopped after 10 iterations, created heap dump and did compare results.

      This is quite important issue and would be nice to fix it soon.
      This memory leak prevents or complicates finding other memory leaks
      and also affect performance results. More memory to be analyzed on every new
      iteration => could slow down the performance.


          Issue Links



              • Assignee:
                anthony Anthony Petrov (Inactive)
                epavlova Ekaterina Pavlova
              • Votes:
                0 Vote for this issue
                4 Start watching this issue


                • Created: