Make sure there is an autorelease pool available when using Cocoa objects

git-svn-id: svn://10.0.0.236/branches/AVIARY_1_0_20040515_BRANCH@157733 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bryner%brianryner.com
2004-06-10 22:01:39 +00:00
parent 776cc5579d
commit a41ea0f580

View File

@@ -45,6 +45,8 @@ void LaunchChildMac(int aArgc, char** aArgv)
int i;
NSTask* child = [[NSTask alloc] init];
NSMutableArray* args = [[NSMutableArray alloc] init];
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
for (i = 1; i < aArgc; ++i)
[args addObject: [NSString stringWithCString: aArgv[i]]];
@@ -52,5 +54,6 @@ void LaunchChildMac(int aArgc, char** aArgv)
[child setLaunchPath:[[NSBundle mainBundle] executablePath]];
[child setArguments:args];
[child launch];
[pool release];
}