From c0db61bd6e07e78ff9a47c8e9ebb26e5859da744 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 5 Mar 2012 16:26:15 +0100 Subject: [PATCH] Moved autorelease pool back to glfwInit. --- src/cocoa_init.m | 2 ++ src/cocoa_window.m | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) 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];