RFR: 8264330: Scene MouseHandler is referencing removed nodes
John Hendrikx
jhendrikx at openjdk.java.net
Wed Mar 31 21:19:15 UTC 2021
On Wed, 31 Mar 2021 13:07:06 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> Small fix to clear a reference to a removed node left by Scene$MouseHandler.
>
> modules/javafx.graphics/src/test/java/test/javafx/scene/SceneTest.java line 1019:
>
>> 1017: pane = null;
>> 1018:
>> 1019: System.gc();
>
> It is not sufficient to call `System.gc()` only once, since it will make for a fragile test. I recommend using the `JMemoryBuddy::assertCollectable` for this, which is what we are using for new tests.
This tool is in javafx.base's test folder, and it is not allowing me to reference it. I'm not quite sure how to change the project to allow this.
-------------
PR: https://git.openjdk.java.net/jfx/pull/448
More information about the openjfx-dev
mailing list