RFR: 8241840: Memoryleak: Closed focused Stages are not collected with Monocle. [v5]
Kevin Rushforth
kcr at openjdk.java.net
Thu Aug 13 19:42:15 UTC 2020
On Sun, 9 Aug 2020 17:11:27 GMT, Florian Kirmaier <fkirmaier at openjdk.org> wrote:
>> tests/system/src/test/java/test/javafx/stage/FocusedWindowTestBase.java line 60:
>>
>>> 59: static WeakReference<Stage> closedFocusedStageWeak = null;
>>> 60: static Stage closedFocusedStage = null;
>>> 61:
>>
>> These two can be instance fields (which is usually preferred for test variables).
>
> They are called from the following static method:
> @BeforeClass
> public static void initFX() throws Exception {
> initFXBase();
> }
No, these two are only used from `testClosedFocusedStageLeakBase`, which is an instance method. I removed `static`
while testing it and it compiles and runs fine.
-------------
PR: https://git.openjdk.java.net/jfx/pull/153
More information about the openjfx-dev
mailing list