• 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: autorelease question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autorelease question


  • Subject: Re: autorelease question
  • From: Bill Bumgarner <email@hidden>
  • Date: Fri, 5 May 2006 07:52:47 -0700

On May 5, 2006, at 7:10 AM, Jerrod Fowkes wrote:

I have a thread that runs continuously. In that thread I need to keep checking a time interval. If it has become 15 mintues or an hour then do some sort of operation. Well, currently I am trying to use NSCalendarDate. My main question is :

If I keep ' time = [NSCalendarDate calendarDate];' in a loop, will that flood the autorelease pool?

My other question is, Do you think this solution would be better handled with an NSTimer?

Yes. And it will manage a release pool for you. Actually, the busy- loop-and-test-a-calendar-data method is fatally flawed in that it uses CPU cycles when the thread isn't doing anything.


Never, ever, create software that does a busy wait....
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: autorelease question
      • From: Bill Bumgarner <email@hidden>
    • Re: autorelease question
      • From: Matt Brindley <email@hidden>
References: 
 >autorelease question (From: Jerrod Fowkes <email@hidden>)

  • Prev by Date: Bindings, searchfield, how to use predicate to search related database
  • Next by Date: Re: autorelease question
  • Previous by thread: autorelease question
  • Next by thread: Re: autorelease question
  • Index(es):
    • Date
    • Thread