RFR: 8349756: Memory leak in PaginationSkin when setting page count / index
Andy Goryachev
angorya at openjdk.org
Tue Feb 11 20:33:16 UTC 2025
On Tue, 11 Feb 2025 15:46:17 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
> ## Root Cause
>
> Each time a `PaginationSkin.IndicatorButton` gets created it adds two listeners (to the control's `styleClass` property and to the skin's tooltipVisible property) via `ListenerHelper`. This was not detected by the `SkinMemoryLeakTest` because all listeners got removed correctly upon skin change.
>
> ## Solution
>
> Add a single listener to the control's `styleClass` property at the skin level, and insert the call to the skin's `tooltipVisible` property both of which iterate over indicator button to do their thing.
I suppose an automated test is possible - launch a new process with lower memory limit and monitor stdout/stderr, to avoid taking down the test framework when OOME happens.
But I agree with you - the kind of stress test we introduced in #1698 is probably as good as any specially developed test.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1705#issuecomment-2652002160
More information about the openjfx-dev
mailing list