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:
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user