Re: NSTimer never being deallocated
Re: NSTimer never being deallocated
- Subject: Re: NSTimer never being deallocated
- From: Tobias Jordan <email@hidden>
- Date: Sun, 14 Mar 2010 00:56:09 +0100
Hi Paul,
You said 'an object you don't manage' -- If I alloc/init an instance
of NSTimer I am responsible for this object, in my opinion. That's why
I tried to do everything properly.
You see I am actually really just trying to prevent memory leaks and I
see lots of leaks in sample code I am downloading somewhere. That's
the reason I am so careful.
Let's just close the topic here, I thank everyone for the
explanations, I appreciate all of them!
Best regards,
Tobias Jordan.
On Mar 13, 2010, at 9:53 PM, Paul Sanders wrote:
I don't understand all the confusion on this issue. The NSTimer
documentation makes the life-cycle of this object very clear.
Until it goes away, it is probably retained by the runloop.
As Joar says, you often can't make any concrete predictions
about when an object you don't manage yourself might be released
for the last time, but if you put a breakpoint on [NSTimer
dealloc] you will be able to see it when it happens.
Paul Sanders.
_______________________________________________
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