<Swing Dev> [11] Review Request: 8202878 com/apple/laf/ScreenMenu/ScreenMenuMemoryLeakTest.java fails
Philip Race
philip.race at oracle.com
Fri May 11 01:45:52 UTC 2018
+1
-phil.
On 5/10/18, 6:42 PM, Sergey Bylokhov wrote:
> Hello.
> Please review the fix for jdk11.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8202878
> Fix: http://cr.openjdk.java.net/~serb/8202878/webrev.00
>
> The test tries to check that the JMenuItem will be collected by GC if
> it was removed from the menu. The problem is that the code below does
> not guarantied that gc will happen:
>
> 68 System.gc();
> 69 System.runFinalization();
> 70 Thread.sleep(1000);
>
> In the fix it is replaced by the code which will generate OOM, to be
> sure that gc will happen.
>
More information about the swing-dev
mailing list