From a41ea0f5807fc14a650dbabc6ec83ea041c0b748 Mon Sep 17 00:00:00 2001 From: "bryner%brianryner.com" Date: Thu, 10 Jun 2004 22:01:39 +0000 Subject: [PATCH] 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 --- mozilla/toolkit/xre/MacLaunchHelper.m | 3 +++ 1 file changed, 3 insertions(+) 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]; }