mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 20:28:49 -05: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
|
||||
name:(__bridge NSString*)kTISNotifySelectedKeyboardInputSourceChanged
|
||||
object:nil];
|
||||
[[NSDistributedNotificationCenter defaultCenter]
|
||||
removeObserver:_glfw.ns.listener];
|
||||
[_glfw.ns.listener release];
|
||||
_glfw.ns.listener = nil;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user