diff --git a/src/cocoa_init.m b/src/cocoa_init.m index 16ea6e68..3251115f 100644 --- a/src/cocoa_init.m +++ b/src/cocoa_init.m @@ -78,6 +78,8 @@ static void changeToResourcesDirectory(void) int _glfwPlatformInit(void) { + _glfwLibrary.NS.autoreleasePool = [[NSAutoreleasePool alloc] init]; + _glfwLibrary.NS.OpenGLFramework = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.opengl")); if (_glfwLibrary.NS.OpenGLFramework == NULL) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 578d1c41..c74138b3 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -600,8 +600,6 @@ static GLboolean initializeAppKit(void) if (NSApp) return GL_TRUE; - _glfwLibrary.NS.autoreleasePool = [[NSAutoreleasePool alloc] init]; - // Implicitly create shared NSApplication instance [GLFWApplication sharedApplication];