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

Cormac Redmond duke at openjdk.org
Thu Dec 18 19:41:05 UTC 2025


On Thu, 18 Dec 2025 16:02:02 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> 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.
>
> modules/javafx.base/src/main/java/javafx/collections/transformation/SortedList.java line 267:
> 
>> 265: 
>> 266:                 // Null out out-of-range array elements to avoid maintaining object references
>> 267:                 for (int i = size; i < (size + c.getRemovedSize()); i++) {
> 
> minor suggestion:
> 
> int ct = size + c.getRemovedSize();
> for (int i = size; i < ct; i++) {

Done, thanks!

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2000#discussion_r2632386015


More information about the openjfx-dev mailing list