• 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
Strategy for NSTimer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strategy for NSTimer


  • Subject: Strategy for NSTimer
  • From: Tim Conkling <email@hidden>
  • Date: Thu, 11 Nov 2004 22:42:06 -0500

I have a situation where I require an NSTimer that occasionally needs to be firing, but usually does not.

Currently, I am simply creating a new timer with +scheduledTimerWithTimeInterval... every time I need it, and then -invalidate'ing it when I'm done. Does this leak memory (I am not retaining the timer after creating it)?

Also, would a better strategy for this situation be to create a timer once, and turn it on and off (with -setFireDate:?) as needed, or should I stick to my current method of doing things?

Thanks,
Tim

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Strategy for NSTimer
      • From: Daniel Todd Currie <email@hidden>
  • Prev by Date: Re: objc_method_list structure?
  • Next by Date: Re: objc_method_list structure?
  • Previous by thread: Re: Custom palette questions
  • Next by thread: Re: Strategy for NSTimer
  • Index(es):
    • Date
    • Thread