RFR: 8263402: MemoryLeak: Node hardreferences it's previous Parent after csslayout and getting removed from the scene [v3]
Kevin Rushforth
kcr at openjdk.java.net
Tue Mar 23 11:20:40 UTC 2021
On Tue, 23 Mar 2021 09:49:42 GMT, Ambarish Rapte <arapte at openjdk.org> wrote:
>> Florian Kirmaier has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8263402
>> Rewrote the style memoryleak test
>
> tests/system/src/test/java/test/javafx/scene/StyleMemoryLeakTest.java line 59:
>
>> 57: startupLatch.countDown();
>> 58: });
>> 59: assertTrue("Timeout waiting for FX runtime to start", startupLatch.await(15, TimeUnit.SECONDS));
>
> The runnable passed to `Platform.startup()` is executed on JavaFX Application thread once it is started. `Platform.setImplicitExit(false);` can be called from any thread. So we do not need to pass the runnable and do not need CountDownLatch.
> This block can be replaced by,
> Platform.startup(null);
> Platform.setImplicitExit(false);
While this is true, I like the current logic better, since it asserts that the platform has started, which provides a better error message in case there is a problem.
-------------
PR: https://git.openjdk.java.net/jfx/pull/424
More information about the openjfx-dev
mailing list