• 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
So Timers Retain Their Targets...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

So Timers Retain Their Targets...


  • Subject: So Timers Retain Their Targets...
  • From: Seth Willits <email@hidden>
  • Date: Sat, 7 May 2005 21:44:36 -0700

Why do timers retain their targets? It's not documented (as far as I could find) but it's obviously happening.

I have a timer that's created when the text in a field changes and in the dealloc method of the timer's target, I invalidate and release the timer. I thought this would have handled the case where the object closes before the timer fires (logically it would) but since the timer retains the object, dealloc isn't called until after the timer fires which causes a crash.




Seth Willits ---------------------------------------------------------- Freak Software - http://www.freaksw.com/ ResExcellence - http://www.resexcellence.com/realbasic/ ----------------------------------------------------------

_______________________________________________
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


  • Prev by Date: Re: Category conflicts with Tiger
  • Next by Date: Another relationship problem
  • Previous by thread: Re: Can't drag/drop create new data model in Interface Builder
  • Next by thread: Re: So Timers Retain Their Targets...
  • Index(es):
    • Date
    • Thread