RFR: 8184166: SortedList does not free up memory

Cormac Redmond duke at openjdk.org
Tue Dec 16 19:18:46 UTC 2025


On Sun, 7 Dec 2025 01:36:02 GMT, Cormac Redmond <duke at openjdk.org> wrote:

> Fix SortedList memory leak by clearing unused entries in the internal array when the source list shrinks. Also nullify tempElement.e after use,
> 
> Adding "--add-opens=javafx.base/javafx.collections.transformation=ALL-UNNAMED" to allow reflection access from tests.

I've moved this PR out of draft to open as I think the implementation is correct.

Also, I am still waiting on this OCA signatory status verification and I am unsure if it's being filtered out somewhere (i.e., unseen) because the PR was not fully open yet.

The unit tests, in my view, are probably verifying too much (via reflection). E.g., most would usually not write such tests to verify the state of internal arrays.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/2000#issuecomment-3657878420


More information about the openjfx-dev mailing list