mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Cocoa: Add missing call to removeObserver:
As noted in the documentation for NSDistributedNotificationCenter, (under the Discussion heading) before an observer is deallocated a call should be made to removeObserver: in order to ensure that the listener is correctly removed from all observation pools. Fixes #817. Closes #826.
This commit is contained in:
parent
25914d381a
commit
74ed35792f
@ -359,6 +359,8 @@ void _glfwPlatformTerminate(void)
|
|||||||
removeObserver:_glfw.ns.listener
|
removeObserver:_glfw.ns.listener
|
||||||
name:(__bridge NSString*)kTISNotifySelectedKeyboardInputSourceChanged
|
name:(__bridge NSString*)kTISNotifySelectedKeyboardInputSourceChanged
|
||||||
object:nil];
|
object:nil];
|
||||||
|
[[NSDistributedNotificationCenter defaultCenter]
|
||||||
|
removeObserver:_glfw.ns.listener];
|
||||||
[_glfw.ns.listener release];
|
[_glfw.ns.listener release];
|
||||||
_glfw.ns.listener = nil;
|
_glfw.ns.listener = nil;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user