src/filesystem/cocoa/SDL_sysfilesystem.m
changeset 9087 eef2e43f60d1
parent 8149 681eb46b8ac4
child 9515 63f5d07c7d70
     1.1 --- a/src/filesystem/cocoa/SDL_sysfilesystem.m	Sun Aug 17 14:57:52 2014 -0700
     1.2 +++ b/src/filesystem/cocoa/SDL_sysfilesystem.m	Sun Aug 17 15:07:00 2014 -0700
     1.3 @@ -35,8 +35,8 @@
     1.4  
     1.5  char *
     1.6  SDL_GetBasePath(void)
     1.7 +{ @autoreleasepool
     1.8  {
     1.9 -    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    1.10      NSBundle *bundle = [NSBundle mainBundle];
    1.11      const char* baseType = [[[bundle infoDictionary] objectForKey:@"SDL_FILESYSTEM_BASE_DIR_TYPE"] UTF8String];
    1.12      const char *base = NULL;
    1.13 @@ -62,14 +62,13 @@
    1.14          }
    1.15      }
    1.16  
    1.17 -    [pool release];
    1.18      return retval;
    1.19 -}
    1.20 +}}
    1.21  
    1.22  char *
    1.23  SDL_GetPrefPath(const char *org, const char *app)
    1.24 +{ @autoreleasepool
    1.25  {
    1.26 -    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    1.27      NSArray *array = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
    1.28      char *retval = NULL;
    1.29  
    1.30 @@ -96,9 +95,8 @@
    1.31          }
    1.32      }
    1.33  
    1.34 -    [pool release];
    1.35      return retval;
    1.36 -}
    1.37 +}}
    1.38  
    1.39  #endif /* SDL_FILESYSTEM_COCOA */
    1.40