changeset 2170:243bc7ae5a21

Needed an autorelease pool around the NSText allocation
author Sam Lantinga <slouken@libsdl.org>
date Wed, 11 Jul 2007 14:44:28 +0000
parents 13cf2d5eda86
children 4bd2dc41fc15
files src/video/cocoa/SDL_cocoakeyboard.m
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);