8184166: SortedList does not free up memory
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.
Progress
- [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
Error
⚠️ OCA signatory status must be verified
Issue
- JDK-8184166: SortedList does not free up memory (Bug - P4)
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/2000/head:pull/2000
$ git checkout pull/2000
Update a local copy of the PR:
$ git checkout pull/2000
$ git pull https://git.openjdk.org/jfx.git pull/2000/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2000
View PR using the GUI difftool:
$ git pr show -t 2000
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/2000.diff
Hi @credmond, welcome to this OpenJDK project and thanks for contributing!
We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.
If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user credmond" as summary for the issue.
If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.
❗ This change is not yet ready to be integrated. See the Progress checklist in the description for automated requirements.
/signed
Thank you! Please allow for up to two weeks to process your OCA, although it is usually done within one to two business days. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!
⚠️ @credmond This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).
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.
/reviewers 2