NSTimer retains its target ???
NSTimer retains its target ???
- Subject: NSTimer retains its target ???
- From: Tobias Hermann <email@hidden>
- Date: Tue, 29 Apr 2003 11:21:44 +0200
Hi!
I am having trouble with NSTimer... it seems that an NSTimer created
with
[NSTimer scheduledTimerWithTimeInterval: 0.5 target: self selector:
@selector(timerAction:) userInfo: nil repeats: YES];
retains the passed target, which is self here.
That is really strange, because I thought TARGETS simply are
references! And the target I pass here is the creator of the Timer, so
it also makes no sense that the Timer retains its parent ?!
Problem is that I want to invalidate the timer within the dealloc
method of the target. But that now never gets called because the timer
retained it :-(
Is that a bug or am I misunderstanding something ?
thanx in advance
Tobi
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.