Fixed SDLMain leaking in OS X

This commit is contained in:
Alex Szpakowski
2013-03-19 11:53:57 -03:00
parent 9e9eb42f1d
commit 74ca349895
+4
View File
@@ -402,6 +402,8 @@ int main (int argc, char **argv)
gFinderLaunch = NO; gFinderLaunch = NO;
} }
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
/* check to see if there are any .love files in Resources - props to stevejohnson/diordna */ /* check to see if there are any .love files in Resources - props to stevejohnson/diordna */
NSArray *lovePaths = [[NSBundle mainBundle] pathsForResourcesOfType:@"love" inDirectory:nil]; NSArray *lovePaths = [[NSBundle mainBundle] pathsForResourcesOfType:@"love" inDirectory:nil];
@@ -448,6 +450,8 @@ int main (int argc, char **argv)
gArgv[gArgc] = NULL; gArgv[gArgc] = NULL;
} }
[pool drain];
#if SDL_USE_NIB_FILE #if SDL_USE_NIB_FILE
[SDLApplication poseAsClass:[NSApplication class]]; [SDLApplication poseAsClass:[NSApplication class]];
NSApplicationMain (argc, argv); NSApplicationMain (argc, argv);