-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
fx2.0
TreeViewMemTest (attached) run in static mode and 16mb of heap fails with OOM after ~65,000 iterations.
The reason is because event handlers reachable from root TreeItem are not removed.
As results there are more than 262,000 WeakEventHandlers which occupy more than 12Mb.
See full root path in attached TreeView_heap.jpg.
The test just creates new TreeView object with 31 static TreeItems (created at the beginning of the test)
on each pulse. TreeView object created on previous pulse is removed before new one is created.
So, only one TreeView object exists at any moment of time.
Steps to run the test:
> java -Xmx16m -verbose:gc -XX:+HeapDumpOnOutOfMemoryError -cp "..." TreeViewMemTest -mode static
There is no such memory issue in case the test is run in dynamic mode (-mode dynamic).
The reason is because event handlers reachable from root TreeItem are not removed.
As results there are more than 262,000 WeakEventHandlers which occupy more than 12Mb.
See full root path in attached TreeView_heap.jpg.
The test just creates new TreeView object with 31 static TreeItems (created at the beginning of the test)
on each pulse. TreeView object created on previous pulse is removed before new one is created.
So, only one TreeView object exists at any moment of time.
Steps to run the test:
> java -Xmx16m -verbose:gc -XX:+HeapDumpOnOutOfMemoryError -cp "..." TreeViewMemTest -mode static
There is no such memory issue in case the test is run in dynamic mode (-mode dynamic).
- relates to
-
JDK-8091659 Controls need a lifecycle API
- Open
-
JDK-8128885 Memory leak in ListView: listeners are not removed
- Resolved