On Fri, 3 Oct 2025 14:46:06 GMT, Marius Hanl <[email protected]> wrote:
>> modules/javafx.controls/src/test/java/test/javafx/scene/control/skin/TreeTableRowSkinTest.java >> line 368: >> >>> 366: JMemoryBuddy.assertCollectable(ref); >>> 367: } >>> 368: >> >> Is there another test that verifies that cells are garbage collectable? For >> example, in the case where a table / list / tree table becomes smaller >> visually, I think that it should then perhaps discard some cells that then >> should be collectable? > > I think there are some when switching the `TableRow`, as this should remove > all old rows and gc them at one point. > > Other than that, I think there is no case where we gc cells. When we change > the viewport width/height, all rows (cells if a `fixedCellSize` is set) will > be piled / cached, but not destroyed. Alright, as long as there are still some GC checks I think this would be fine. Not sure if I agree with keeping cells/rows around that exceed the amount that are currently displayed, but that's how it already works (my own virtualized controls will only reference the cells displayed, but with non-fixed size cells/rows this may not be optimal). ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1830#discussion_r2403736449
