RFR: 8294589: MenuBarSkin: memory leak when changing skin
Andy Goryachev
angorya at openjdk.org
Tue Oct 4 20:19:32 UTC 2022
On Tue, 4 Oct 2022 14:46:38 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:
>> Fixed memory leak by using weak listeners and making sure to undo everything that has been done to MenuBar/Skin in dispose().
>
> modules/javafx.controls/src/main/java/com/sun/javafx/scene/control/LambdaMultiplePropertyChangeListenerHandler.java line 183:
>
>> 181: consumer.accept(v);
>> 182: }
>> 183: });
>
> beware: unregister removes _all_ listeners (of type InvalidationListener) from the given property
this makes no sense! thank you for pointing it out.
perhaps we really *ought to* create a better LambdaMultiplePropertyChangeListenerHandler implementation.
-------------
PR: https://git.openjdk.org/jfx/pull/906
More information about the openjfx-dev
mailing list