• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: performSelectorInBackground:anObject:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: performSelectorInBackground:anObject:


  • Subject: Re: performSelectorInBackground:anObject:
  • From: "Rick C." <email@hidden>
  • Date: Fri, 4 Sep 2009 15:49:43 -0700 (PDT)

thanks jens i'll look further into it,

rick




________________________________
From: Jens Alfke <email@hidden>
To: Rick C. <email@hidden>
Cc: cocoa dev <email@hidden>
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@hidden)

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:

This email sent to email@hidden

References: 
 >performSelectorInBackground:anObject: (From: "Rick C." <email@hidden>)
 >Re: performSelectorInBackground:anObject: (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: capturing a partial screen.
  • Next by Date: Re: Application main menu title behavior change in 10.6
  • Previous by thread: Re: performSelectorInBackground:anObject:
  • Next by thread: removeObserver:forKeyPath: thread safe?
  • Index(es):
    • Date
    • Thread