diff --git a/mozilla/toolkit/xre/MacLaunchHelper.m b/mozilla/toolkit/xre/MacLaunchHelper.m index e598ff321a7..a24b93b1323 100644 --- a/mozilla/toolkit/xre/MacLaunchHelper.m +++ b/mozilla/toolkit/xre/MacLaunchHelper.m @@ -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]; }