mirror of
https://github.com/glfw/glfw.git
synced 2025-10-05 06:06:36 +00:00
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 all the listener is unbound from all observation pools correctly. I can confirm that this fixes #817 for me. https://developer.apple.com/reference/foundation/nsdistributednotificationcenter/1416236-removeobserver?language=objc
This commit is contained in:
parent
25914d381a
commit
16a334e857
@ -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