-
Bug
-
Resolution: Fixed
-
P3
-
fx2.0
ListViewMemTest (attached) run in static mode and 16mb of heap fails with OOM after ~18,000 iterations.
The reason is because listeners are not removed.
staticListViewData -> observers -> elementData array has 297,868 elements (WeakListChangeListener)
at the time the test fails with OOM. See attached ListView_heap.jpg as well.
The test just creates new ListView object with static elements (created at the beginning of the test)
on each pulse. ListView object created on previous pulse is removed before new one is created.
So, only one ListView object exists at any moment of time.
Steps to run the test:
> java -Xmx16m -verbose:gc -XX:+HeapDumpOnOutOfMemoryError -cp "..." ListViewMemTest -mode static
There is no such memory issue in case the test is run in dynamic mode (-mode dynamic).
The reason is because listeners are not removed.
staticListViewData -> observers -> elementData array has 297,868 elements (WeakListChangeListener)
at the time the test fails with OOM. See attached ListView_heap.jpg as well.
The test just creates new ListView object with static elements (created at the beginning of the test)
on each pulse. ListView object created on previous pulse is removed before new one is created.
So, only one ListView object exists at any moment of time.
Steps to run the test:
> java -Xmx16m -verbose:gc -XX:+HeapDumpOnOutOfMemoryError -cp "..." ListViewMemTest -mode static
There is no such memory issue in case the test is run in dynamic mode (-mode dynamic).
- relates to
-
JDK-8116148 Memory Leak: event handlers of root TreeItem are not removed
-
- Closed
-
-
JDK-8091659 Controls need a lifecycle API
-
- Open
-