A DESCRIPTION OF THE PROBLEM :
In class VirtualFlow there exists a private method getPrivateCell(int) which at the end could add a new cell to an array called privateCells. Elements from this array are never removed.
An element could be e. g. a TableRow (via TableView) which could use hundreds of KB of memory. Therefore if lots of such elements are added this could lead to an OutOfMemory error.
The call hierarchy of this method shows that the method getPrivateCell(int) is only called via the method queryAccessibleAttribute(AccessibleAttribute, Object...). This could imply that this issue is only relevant when Accessability is turned on.
According to the source code this could affect the controls TableView, TreeTableView and ListView.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a TableView. Use a Screen-Reader (e. g. narrator under Windows 10) to turn on Accessibility for the window. That Accessibility is turned on can be verified via the property Platform.accessibilityActiveProperty().
When adding new rows to the table under certain workflows (e. g. click on row, sort, etc.) a TableRow element is added to an internal List privateCells in VirtualFlow in method getPrivateCell().
With a debugger (setting a breakpoint at line where element is added to privateCells) or by creating a heap dump one can verify that elements get added to the List privateCells. However these elements are never removed as one can verify be reading the source code.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
TableRow elements should be removed from privateCells after some time.
Maybe in the method releaseAllPrivateCells()?
ACTUAL -
TableRow elements are never removed from privateCells.
CUSTOMER SUBMITTED WORKAROUND :
As a workaround one can set the system property "glass.accessible.force" to "false".
This turns off Accessability and therefore does not cause the memory leak. Note that Accessability is turned on by default only on Mac 10.9 and Windows 7 or greater according to notes in com.sun.glass.ui.View.