<AWT Dev> [13] Review Request: 8215756 Memory leaks in the AWT on macOS
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Fri Dec 21 00:20:29 UTC 2018
Hello.
Please review the fix for jdk 13.
Bug: https://bugs.openjdk.java.net/browse/JDK-8215756
Webrev: http://cr.openjdk.java.net/~serb/8215756/webrev.00
Two memory leaks were fixed:
- AWTView.m: we should release the NSTrackingArea, usually we do this
when we change NSTrackingArea from one to another:
http://hg.openjdk.java.net/jdk/jdk/file/3791fee4df3b/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m#l437
But we also need to do this when the window is deallocated
- AWTWindow.m: We have a JNFWeakJObjectWrapper which holds the reference to the java object,
when the window is deallocated we clear the reference to the java object, but
we also need to release the JNFWeakJObjectWrapper object itself
I have checked by the Instruments that the test attached to the bug will not produce any other leaks after the fix.
--
Best regards, Sergey.
More information about the awt-dev
mailing list