• 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
NSTimer retain and release questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTimer retain and release questions


  • Subject: NSTimer retain and release questions
  • From: Kyle <email@hidden>
  • Date: Wed, 10 Sep 2008 11:21:09 -0700

The documentation for this autoreleased method:

+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)seconds target:(id)target selector:(SEL)aSelector userInfo:(id)userInfo repeats:(BOOL)repeats

states: "If repeats is NO, the timer will be invalidated after it fires."

If I call this autoreleased method, and set repeats to YES, does that imply I do not need to retain the object if I want to invalidate it later? In other words, is this autoreleased method autoreleased only when repeats is NO, otherwise it is not autoreleased?

Just want to make sure I understand it correctly.  Thanks in advance!

_______________________________________________

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


  • Follow-Ups:
    • Re: NSTimer retain and release questions
      • From: Bill Bumgarner <email@hidden>
  • Prev by Date: Re: Cocoa-dev Digest, Vol 5, Issue 1598
  • Next by Date: Re: NSTimer retain and release questions
  • Previous by thread: Re: CoreData with ODBC as the Object Store
  • Next by thread: Re: NSTimer retain and release questions
  • Index(es):
    • Date
    • Thread