Re: autorelease question
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