On Thu, 29 Sep 2022 23:00:17 GMT, Andy Goryachev <[email protected]> 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/javafx/scene/control/skin/MenuBarSkin.java line 950: > 948: > 949: > getSkinnable().focusedProperty().addListener(weakMenuBarFocusedPropertyListener); > 950: - listeners on skinnable's properties should be installed via skin api - skinnable's properties don't change, so no need to add/remove in rebuild - instead do it once take both with a grain of salt, though, and test if that's really possible :) I think it does - the value is a boolean so the old is always the !current. ------------- PR: https://git.openjdk.org/jfx/pull/906
