Re: NSTimer never being deallocated
Re: NSTimer never being deallocated
- Subject: Re: NSTimer never being deallocated
- From: Gordon Apple <email@hidden>
- Date: Sat, 13 Mar 2010 14:45:44 -0600
- Thread-topic: NSTimer never being deallocated
I haven't followed this whole thread, but my experience is that an NSTimer
(especially a repetitive one) is an easy thing to leak, even in a GC
environment (which I use). To prevent it, you have to make sure you keep a
reference to the timer so that you can actually invalidate it, taking it out
of the run loop. Otherwise, it stays there forever.
On 3/13/10 2:02 PM, "email@hidden"
<email@hidden> wrote:
> For the benefit of the OP, according to the docs (and this fits in with my own
> experience), calling [NSTimer invalidate] will release the timer at some
> future point in the run loop and is in fact the only way to get rid of it. So
> there is really nothing to worrry about. Trust in Papa Cocoa, all will be
> well.
_______________________________________________
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