• 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: NSTimer memory management
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTimer memory management


  • Subject: Re: NSTimer memory management
  • From: "email@hidden" <email@hidden>
  • Date: Mon, 27 Sep 2010 12:09:24 +0200

On Sun, Sep 26, 2010 at 5:39 PM, Jeff Johnson
<email@hidden> wrote:
> 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." ;-)

At least I can't be held responsible when the lights go out. But I
never had a problem with -performSelector: so I guess they know what
they are doing under the hood.
_______________________________________________

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

References: 
 >Re: NSTimer memory management (From: Gregory Weston <email@hidden>)
 >Re: NSTimer memory management (From: "email@hidden" <email@hidden>)
 >Re: NSTimer memory management (From: Jeff Johnson <email@hidden>)

  • Prev by Date: Re: -[NSCFArray initWithObjects:count:]: nil object. Why no crash?
  • Next by Date: [ANN] A new book by Erik M. Buck
  • Previous by thread: Re: NSTimer memory management
  • Next by thread: [ANN] Release: NanoStore 1.0 for Mac and iOS
  • Index(es):
    • Date
    • Thread