• 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: Memory Management Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory Management Question


  • Subject: Re: Memory Management Question
  • From: Seth Pellegrino <email@hidden>
  • Date: Tue, 3 Jul 2007 13:13:57 -0400


On Jul 2, 2007, at 11:46 AM, Daniel T. Staal wrote:


On Mon, July 2, 2007 11:40 am, Seth Pellegrino said:

Any particular reason you are trying to use objects after disposing of
them? In general, you don't throw things away until you are _done_ with
them...

Mainly my problem is with the NSTimer class. Whenever the user clicks pause in my application, I call -[invalidate] to stop the timer from firing (as there seems to be no -[pause] or similar). However, this causes the run loop to release the timer, so whenever I try to call - [isValid], my program crashes. As I type this, I realize that I should be also -[retain]ing my instance of the NSTimer class, but if I do so, is there a way to make an invalidated timer resume firing? Or would it be better to just use a BOOL isPaused and an if statement?


Also, to everyone else who responded, thank you very much for your great information! I'm sure the NSZombie will come in very handy in the future.

Seth

_______________________________________________

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: Memory Management Question
      • From: James Bucanek <email@hidden>
    • Re: Memory Management Question
      • From: "Daniel T. Staal" <email@hidden>
References: 
 >Memory Management Question (From: Seth Pellegrino <email@hidden>)
 >Re: Memory Management Question (From: "Daniel T. Staal" <email@hidden>)

  • Prev by Date: Re: Cocoa and dead-code stripping
  • Next by Date: subclass NSToolbar for iLife style
  • Previous by thread: Re: Memory Management Question
  • Next by thread: Re: Memory Management Question
  • Index(es):
    • Date
    • Thread