RFR: 8318841: macOS: Memory leak with MenuItem when Menu.useSystemMenuBar(true) is used [v4]
Kevin Rushforth
kcr at openjdk.org
Thu Nov 9 12:39:09 UTC 2023
On Thu, 9 Nov 2023 09:25:11 GMT, Johan Vos <jvos at openjdk.org> wrote:
>> tests/system/src/test/java/test/javafx/stage/SystemMenuBarTest.java line 145:
>>
>>> 143: stage.show();
>>> 144: stage.requestFocus();
>>> 145: Thread t = new Thread(){
>>
>> Question: Since you do all the work in a `Platform.runLater`, is this thread needed?
>
> That's a good question. I do this because we start the test on the FX Thread, but I want to add/remove the menuItems one by one, giving time for a `pulse` in between them. If we do the 50 runs inside a single Runnable, without the possibility for the FX Thread to do other work, the result can be different compared to what we do when doing this in small runnables.
> But I might be missing something here?
Oh, I see that now. I had missed that you were calling this method from within a `Util::runAndWait`. Never mind.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1277#discussion_r1387941543
More information about the openjfx-dev
mailing list