RFR: 8184166: SortedList does not free up memory [v4]

Cormac Redmond duke at openjdk.org
Thu Dec 18 00:28:20 UTC 2025


> 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.

Cormac Redmond has updated the pull request incrementally with one additional commit since the last revision:

  8184166: Move nulling of out-of-range elements to inside if (c.wasRemoved()) { } block, as this is only where it's required.

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

Changes:
  - all: https://git.openjdk.org/jfx/pull/2000/files
  - new: https://git.openjdk.org/jfx/pull/2000/files/c50c72d8..d09a85b5

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jfx&pr=2000&range=03
 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=2000&range=02-03

  Stats: 15 lines in 1 file changed: 5 ins; 10 del; 0 mod
  Patch: https://git.openjdk.org/jfx/pull/2000.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/2000/head:pull/2000

PR: https://git.openjdk.org/jfx/pull/2000


More information about the openjfx-dev mailing list