提交 cdbd5f15 编写于 作者: S stooke

8215756: Memory leaks in the AWT on macOS

Reviewed-by: shade, andrew
上级 9e226c07
/*
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -144,6 +144,11 @@ AWT_ASSERT_APPKIT_THREAD;
fInputMethodLOCKABLE = NULL;
}
if (rolloverTrackingArea != nil) {
[self removeTrackingArea:rolloverTrackingArea];
[rolloverTrackingArea release];
rolloverTrackingArea = nil;
}
[super dealloc];
}
......
......@@ -456,7 +456,7 @@ AWT_ASSERT_APPKIT_THREAD;
JNIEnv *env = [ThreadUtilities getJNIEnvUncached];
[self.javaPlatformWindow setJObject:nil withEnv:env];
self.javaPlatformWindow = nil;
self.nsWindow = nil;
self.ownerWindow = nil;
[super dealloc];
......
......@@ -203,7 +203,7 @@ JNF_COCOA_ENTER(env);
return;
}
[wrapper setJObject:NULL withEnv:env]; // more efficiant to pre-clear
[wrapper setJObject:NULL withEnv:env]; // more efficient to pre-clear
[wrapper release];
JNF_COCOA_EXIT(env);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册