RFR: 8294589: MenuBarSkin: memory leak when changing skin [v2]
Andy Goryachev
angorya at openjdk.org
Tue Oct 11 18:59:40 UTC 2022
On Wed, 5 Oct 2022 11:32:04 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:
>> well, it _does_ make sense for listeners registered on properties of the control itself (they don't change and are un/registered once) - and that was it was designed for :) What it can't handle (and was not designed for) are dynamic multiple un/registration of listeners.
>
> btw: the executeOnce pattern is appropriate only if it's guaranteed that the value changes once from null to not-null (not back again) .. which is not the case for the value of a control's scene property - it can change in both directions or not at all (which might be the reason for having added a second listener ;)
you are so right here.
-------------
PR: https://git.openjdk.org/jfx/pull/906
More information about the openjfx-dev
mailing list