src/video/cocoa/SDL_cocoamessagebox.m
changeset 6714 146d1d7ecdc4
parent 6639 c7e81fae23c4
child 6832 156e608ec4ef
--- a/src/video/cocoa/SDL_cocoamessagebox.m	Wed Nov 28 19:19:57 2012 -0800
+++ b/src/video/cocoa/SDL_cocoamessagebox.m	Thu Nov 29 00:45:36 2012 -0800
@@ -51,8 +51,8 @@
         [alert setAlertStyle:NSInformationalAlertStyle];
     }
 
-    [alert setMessageText:[[NSString alloc] initWithUTF8String:messageboxdata->title]];
-    [alert setInformativeText:[[NSString alloc] initWithUTF8String:messageboxdata->message]];
+    [alert setMessageText:[NSString stringWithUTF8String:messageboxdata->title]];
+    [alert setInformativeText:[NSString stringWithUTF8String:messageboxdata->message]];
 
     const SDL_MessageBoxButtonData *buttons = messageboxdata->buttons;
     int i;
@@ -70,6 +70,7 @@
     NSInteger clicked = [alert runModal];
     clicked -= NSAlertFirstButtonReturn;
     *buttonid = buttons[clicked].buttonid;
+    [alert release];
 
     [pool release];