diff --git a/src/macosx/native/sun/awt/AWTView.m b/src/macosx/native/sun/awt/AWTView.m index 0cb28c8a3ff2dea6dbbc642a54ab4d46b862f6a6..29dd6410eafa134b60bb62146e83ecc58e3c221c 100644 --- a/src/macosx/native/sun/awt/AWTView.m +++ b/src/macosx/native/sun/awt/AWTView.m @@ -1,5 +1,5 @@ /* - * 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]; } diff --git a/src/macosx/native/sun/awt/AWTWindow.m b/src/macosx/native/sun/awt/AWTWindow.m index bd19d8f7e6ea26b839a505267957f11b1d8643fc..4cc2ace5babeeea8ac5c4d2b4171572b54e3d18d 100644 --- a/src/macosx/native/sun/awt/AWTWindow.m +++ b/src/macosx/native/sun/awt/AWTWindow.m @@ -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]; diff --git a/src/macosx/native/sun/awt/CGraphicsEnv.m b/src/macosx/native/sun/awt/CGraphicsEnv.m index cc83026b9a93d79867bb23491a92cccf06d5752b..4815b5a659d1506b605a3b5288a6c5b9ce0976a8 100644 --- a/src/macosx/native/sun/awt/CGraphicsEnv.m +++ b/src/macosx/native/sun/awt/CGraphicsEnv.m @@ -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);