Re: NSDate autorelease problem
Re: NSDate autorelease problem
- Subject: Re: NSDate autorelease problem
- From: Jean-Daniel Dupas <email@hidden>
- Date: Wed, 3 Sep 2008 19:15:30 +0200
Le 3 sept. 08 à 19:02, email@hidden a écrit :
Hi,
I'm trying to calculate the elapsed time by calling this twice and
getting the difference.
double Seconds()
{
return [[NSDate date] timeIntervalSince1970];
}
This is being called from an audio play back proc which is being
called about 100 times a second. I'm getting this error message in
the log window a whole bunch of times.
2008-09-03 09:39:30.766 App[321] *** _NSAutoreleaseNoPool(): Object
0x36acd0 of class NSCFDate autoreleased with no pool in place - just
leaking
What I think is happening is that it's not being released fast
enough. I was using AbsoluteToNanoseconds(UpTime()) but that's
Carbon and that won't work in 10.6.
Any ideas?
CFAbsoluteTimeGetCurrent()
and if you need something with a better precision see this note:
http://developer.apple.com/qa/qa2004/qa1398.html
_______________________________________________
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