Needed an autorelease pool around the NSText allocation
authorSam Lantinga <slouken@libsdl.org>
Wed, 11 Jul 2007 14:44:28 +0000
changeset 2170 243bc7ae5a21
parent 2169 13cf2d5eda86
child 2171 4bd2dc41fc15
Needed an autorelease pool around the NSText allocation
src/video/cocoa/SDL_cocoakeyboard.m
--- a/src/video/cocoa/SDL_cocoakeyboard.m	Wed Jul 11 08:09:20 2007 +0000
+++ b/src/video/cocoa/SDL_cocoakeyboard.m	Wed Jul 11 14:44:28 2007 +0000
@@ -511,10 +511,13 @@
 {
     SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
     SDL_Keyboard keyboard;
+    NSAutoreleasePool *pool;
 
     InitKeymap(data->keymap);
 
+    pool = [[NSAutoreleasePool alloc] init];
     data->fieldEdit = [[NSTextView alloc] initWithFrame:NSMakeRect(0.0, 0.0, 0.0, 0.0)];
+    [pool release];
     
     SDL_zero(keyboard);
     data->keyboard = SDL_AddKeyboard(&keyboard, -1);