diff options
author | Nicholas Maccharoli <nmaccharoli@gmail.com> | 2015-07-16 00:28:51 +0900 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2015-07-19 17:16:01 -0700 |
commit | 9fd6b5e1e295be0a7a32a88a0107ebbac1ee26a7 (patch) | |
tree | 7a08e385bea12fb0ae5e52b6a96852e68e72d5da /osx | |
parent | 466806fb1106f4cf7a76f3e1f67beb8a64f79865 (diff) |
Use newer syntax for autorelease pool
Diffstat (limited to 'osx')
-rw-r--r-- | osx/osx_fish_launcher.m | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/osx/osx_fish_launcher.m b/osx/osx_fish_launcher.m index 8b24d2ec..20b6e61b 100644 --- a/osx/osx_fish_launcher.m +++ b/osx/osx_fish_launcher.m @@ -84,14 +84,15 @@ static void launch_fish_with_applescript(NSString *fish_binary_path) /* This approach asks Terminal to open a script that we control */ int main(void) { - [[NSAutoreleasePool alloc] init]; - /* Get the fish executable. Make sure it's absolute. */ - NSURL *fish_executable = [[NSBundle mainBundle] URLForResource:@"fish" withExtension:@"" subdirectory:@"base/bin"]; - if (! fish_executable) - die("Could not find fish executable in bundle"); + @autoreleasepool { + /* Get the fish executable. Make sure it's absolute. */ + NSURL *fish_executable = [[NSBundle mainBundle] URLForResource:@"fish" withExtension:@"" subdirectory:@"base/bin"]; + if (! fish_executable) + die("Could not find fish executable in bundle"); - launch_fish_with_applescript([fish_executable path]); + launch_fish_with_applescript([fish_executable path]); + } /* If we succeeded, it will clean itself up */ return 0; |