On Mon, 17 Oct 2022 22:42:42 GMT, Andy Goryachev <[email protected]> wrote:
> as determined by SkinMemoryLeakTest (remove line 170) and a leak tester > https://github.com/andy-goryachev-oracle/Test/blob/main/src/goryachev/apps/LeakTest.java > > Also applies to SplitMenuButton, since they share the same base class > MenuButtonSkinBase. > > Make sure to configure the current test in LeakTest: > protected final Type WE_ARE_TESTING = Type.MENU_BUTTON; // or > SPLIT_MENU_BUTTON > > In addition, there seems to be another failure scenario when simply replacing > the skin - no menu is shown upon a click. To reproduce, launch LeakTest and > click once on the [Replace Skin] button. Second click restores the function. > > caused by: > - adding and not removing EventHandlers > - setting and not clearing onAction handlers > - incorrect logic in setting mousePressed/mouse/Released handlers This pull request has now been integrated. Changeset: 4a19fe71 Author: Andy Goryachev <[email protected]> URL: https://git.openjdk.org/jfx/commit/4a19fe71f9151460dca97d4ca9962fd630404ee8 Stats: 175 lines in 4 files changed: 109 ins; 32 del; 34 mod 8295426: MenuButtonSkin: memory leak when changing skin Reviewed-by: aghaisas ------------- PR: https://git.openjdk.org/jfx/pull/919
