RFR: 8241455: ChoiceBox - memory leak on replacing selectionModel
Kevin Rushforth
kcr at openjdk.java.net
Thu Mar 26 12:27:29 UTC 2020
On Thu, 26 Mar 2020 11:37:06 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:
>> @arapte @aghaisas - Can you both review this?
>
> I would like to widen the issue (and change this pull request accordingly) to include memory leaks of introduced
> selection- and focusModels in other controls that are caused by the basically same reason, that is strong references
> via listeners to controls' properties. The fix would be the same as well, that is wrap the listeners into
> weakXXListeners and register these. The models suggested to include here:
> - TreeView: selection- and focusModel
> - TreeTableView: focusModel
> - TabPane: selectionModel
>
> Not included would be memory leaks introduced by whacky listening of ChoiceBoxSkin and TabPaneSkin to properties of the
> selectionModel. The former will (most probably) be fixed as a side-effect of
> https://bugs.openjdk.java.net/browse/JDK-8087555 (which I intend to take, if Ajit agrees :), will open a separate issue
> for the latter. The extended fix here will have tests for replacing selection/focusModels with/out a skin registered
> for all controls having the respective models. Not entirely certain about the formal procedure (locally fix and tests
> are - nearly, pending some cleanup - ready). Simply change titles, rebase and push again?
If Ambarish and Ajit are OK with this, then the procedure would be as you guessed: change the title of both the JBS bug
and then this PR and push your new fix (with or without rebasing would be fine).
-------------
PR: https://git.openjdk.java.net/jfx/pull/148
More information about the openjfx-dev
mailing list