So Timers Retain Their Targets...
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