src/video/cocoa/SDL_cocoamessagebox.m
changeset 9087 eef2e43f60d1
parent 8986 1c81316ac642
child 9619 b94b6d0bff0f
     1.1 --- a/src/video/cocoa/SDL_cocoamessagebox.m	Sun Aug 17 14:57:52 2014 -0700
     1.2 +++ b/src/video/cocoa/SDL_cocoamessagebox.m	Sun Aug 17 15:07:00 2014 -0700
     1.3 @@ -79,11 +79,10 @@
     1.4  /* Display a Cocoa message box */
     1.5  int
     1.6  Cocoa_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
     1.7 +{ @autoreleasepool
     1.8  {
     1.9      Cocoa_RegisterApp();
    1.10  
    1.11 -    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    1.12 -
    1.13      NSAlert* alert = [[[NSAlert alloc] init] autorelease];
    1.14  
    1.15      if (messageboxdata->flags & SDL_MESSAGEBOX_ERROR) {
    1.16 @@ -125,10 +124,8 @@
    1.17          returnValue = SDL_SetError("Did not get a valid `clicked button' id: %ld", (long)clicked);
    1.18      }
    1.19  
    1.20 -    [pool release];
    1.21 -
    1.22      return returnValue;
    1.23 -}
    1.24 +}}
    1.25  
    1.26  #endif /* SDL_VIDEO_DRIVER_COCOA */
    1.27