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

Re: NSDate autorelease problem


  • Subject: Re: NSDate autorelease problem
  • From: Gregory Weston <email@hidden>
  • Date: Wed, 03 Sep 2008 14:22:55 -0400

email@hidden wrote:

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.

Wouldn't it make more sense to believe that it's being autoreleased without there being an established autorelease pool? You said you're trying to call that routine, but you didn't say whence you were trying to call it.



I was using AbsoluteToNanoseconds(UpTime()) but that's Carbon and that
won't work in 10.6.

Cough. I'm sure you didn't mean to just talk publicly about a product under NDA. That said, it seems odd to suggest that something which isn't even marked as deprecated today will cease functioning wholesale in, oh, say, less than a year.
_______________________________________________


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


  • Prev by Date: Re: NSOutlineView developer example
  • Next by Date: Re: NSDate autorelease problem
  • Previous by thread: Re: NSDate autorelease problem
  • Next by thread: Garbage collection and compiling of non GC framework (MCPKit library)
  • Index(es):
    • Date
    • Thread