# HG changeset patch # User Zorg # Date 1301804018 14400 # Node ID b0b560f561b5a23364e6eaf98f398cd3f426dd9d # Parent 2d2422772832a68a713b24e5d7133550bed55d5b Fixed messages complaining about no autorelease pool being set up with objects leaking on the Mac. I simply initialized an autorelease pool in the couple of places that needed it. diff -r 2d2422772832 -r b0b560f561b5 QTfrontend/M3Panel.mm --- a/QTfrontend/M3Panel.mm Sat Apr 02 12:52:19 2011 -0400 +++ b/QTfrontend/M3Panel.mm Sun Apr 03 00:13:38 2011 -0400 @@ -18,6 +18,7 @@ #include "M3Panel.h" #include "M3InstallController.h" +#include "CocoaInitializer.h" #include @@ -30,7 +31,8 @@ M3Panel::M3Panel(void) { c = new Private; - + + CocoaInitializer initializer; c->install = [[M3InstallController alloc] init]; [c->install retain]; diff -r 2d2422772832 -r b0b560f561b5 QTfrontend/SDLs.cpp --- a/QTfrontend/SDLs.cpp Sat Apr 02 12:52:19 2011 -0400 +++ b/QTfrontend/SDLs.cpp Sun Apr 03 00:13:38 2011 -0400 @@ -24,6 +24,10 @@ #include +#ifdef __APPLE__ +#include "CocoaInitializer.h" +#endif + extern char sdlkeys[1024][2][128]; extern char xb360buttons[][128]; @@ -33,7 +37,11 @@ SDLInteraction::SDLInteraction() { - +#ifdef __APPLE__ + // SDL_Init needs a NSAutoreleasePool set up + CocoaInitializer initializer; +#endif + SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK); musicInitialized = 0;