RFR: 8318841: macOS: Memory leak with MenuItem when Menu.useSystemMenuBar(true) is used [v6]
Johan Vos
jvos at openjdk.org
Fri Nov 10 10:01:14 UTC 2023
On Thu, 9 Nov 2023 22:09:30 GMT, Jose Pereda <jpereda at openjdk.org> wrote:
>> Johan Vos has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use only 10 cycles instead of 50 (preventing this test to take 50 seconds in case it fails).
>
> tests/system/src/test/java/test/javafx/stage/SystemMenuBarTest.java line 164:
>
>> 162: });
>> 163: }
>> 164: Platform.runLater( () -> {
>
> Why is `Platform.runLater` needed here? To wait until the last `Platform.runLater` in the for loop ends? Is it guaranteed that it will be called only after the previous one ends?
>
> Minor: remove unneeded white space: `Platform.runLater(() -> {`
No, it is needed because we want to give the JavaFX platform the opportunity to do "whatever is needed" after the last runLater() is done. Hence, we put what we want to do on the Runnable queue of the FX thread, so that we don't depend on internals.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1277#discussion_r1389184538
More information about the openjfx-dev
mailing list