RFR: 8294589: MenuBarSkin: memory leak when changing skin
Jeanette Winzenburg
fastegal at openjdk.org
Mon Oct 3 21:44:05 UTC 2022
On Thu, 29 Sep 2022 23:00:17 GMT, Andy Goryachev <angorya 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/test/java/test/javafx/scene/control/skin/SkinMemoryLeakTest.java line 94:
> 92: public void testMemoryLeakSameSkinClass() {
> 93: showControl(control, true);
> 94: installDefaultSkin(control);
no - here we test the isolated skin installation, no need for actually showing it. Please don't change the semantic of existing tests.
modules/javafx.controls/src/test/java/test/javafx/scene/control/skin/SkinMemoryLeakTest.java line 225:
> 223: protected void showControl(Control control, boolean focused) {
> 224: // use StageLoader maybe?
> 225: if (root == null) {
we could, but don't here for consistency - the pattern is used across multiple tests to guarantee full control about the layout (which conceededly is not needed here :)
-------------
PR: https://git.openjdk.org/jfx/pull/906
More information about the openjfx-dev
mailing list