Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > NSTask will thread leak on Leopard?

NSTask will thread leak on Leopard?
Thread Tools
yesea
Fresh-Faced Recruit
Join Date: Oct 2004
Status: Offline
Reply With Quote
Dec 9, 2008, 02:07 AM
 
I launch one application with NSTask, but when the the launched process has exit. I find the parent process's thread will increate.
Code:
NSWorkspace *workSpace = [NSWorkspace sharedWorkspace]; NSString *appPath = [workSpace absolutePathForAppBundleWithIdentifier:@"com.company.someapp"]; NSBundle *appBundle = [NSBundle bundleWithPath:appPath]; NSString *excuPath = [appBundle executablePath]; NSMutableArray* args = [[[NSMutableArray alloc] init] autorelease]; NSString* arg1 = @"some args"; [args addObject:arg1]; NSTask* theTask = [NSTask launchedTaskWithLaunchPath:excuPath arguments:args]; [theTask waitUntilExit];
On tiger. it don't increate. if there is some bugs in my code? or it's OS issue?
Thanks
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 04:45 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,