thanks jens i'll look further into it,

rick




________________________________
From: Jens Alfke <[email protected]>
To: Rick C. <[email protected]>
Cc: cocoa dev <[email protected]>
Sent: Saturday, September 5, 2009 1:29:05 AM
Subject: Re: performSelectorInBackground:anObject:


On Sep 4, 2009, at 2:55 AM, Rick C. wrote:

> i use this method at various places in my project as an easy/safe way to do 
> some background processing.  i realize with every call it will initiate the 
> selector on a new background thread.  but i have noticed by observing 
> activity monitor that it takes quite some time for these threads to go away 
> once they have been initiated.

Foundation may be keeping the thread alive for a while in case you want to run 
another background task on it, but I'm not sure.

> are there any additional steps to take to make sure these threads and the 
> memory being used are ended properly?

Not that I know of. If you're going to be running a lot of background 
operations and want more control over threading, try using NSOperationQueue 
instead (or the new Grand Central stuff in 10.6.)

—Jens



_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to