Re: NSTimer memory management
Re: NSTimer memory management
- Subject: Re: NSTimer memory management
- From: Jeff Johnson <email@hidden>
- Date: Sun, 26 Sep 2010 10:39:33 -0500
On Sep 23, 2010, at 6:13 PM, email@hidden wrote:
> In this particular case, though, I might just as well get rid of the
> timer altogether and go for NSObject's
> performSelector:afterDelay:/cancelSelector: instead. Jeff's
> enlightening (and frightening!) discussion about implicit retain
> cycles makes me want to stay as far away from NSTimers as possible.
Have you read the documentation for -performSelector:withObject:afterDelay: ? "This method sets up a timer to perform the aSelector message on the current thread’s run loop." "This method retains the receiver and the anArgument parameter until after the selector is performed." ;-)
-Jeff
_______________________________________________
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