comparison src/video/cocoa/SDL_cocoakeyboard.m @ 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 4baee598306d
comparison
equal deleted inserted replaced
2169:13cf2d5eda86 2170:243bc7ae5a21
509 void 509 void
510 Cocoa_InitKeyboard(_THIS) 510 Cocoa_InitKeyboard(_THIS)
511 { 511 {
512 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; 512 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
513 SDL_Keyboard keyboard; 513 SDL_Keyboard keyboard;
514 NSAutoreleasePool *pool;
514 515
515 InitKeymap(data->keymap); 516 InitKeymap(data->keymap);
516 517
518 pool = [[NSAutoreleasePool alloc] init];
517 data->fieldEdit = [[NSTextView alloc] initWithFrame:NSMakeRect(0.0, 0.0, 0.0, 0.0)]; 519 data->fieldEdit = [[NSTextView alloc] initWithFrame:NSMakeRect(0.0, 0.0, 0.0, 0.0)];
520 [pool release];
518 521
519 SDL_zero(keyboard); 522 SDL_zero(keyboard);
520 data->keyboard = SDL_AddKeyboard(&keyboard, -1); 523 data->keyboard = SDL_AddKeyboard(&keyboard, -1);
521 } 524 }
522 525