I use a lot of timers in my application. For recording time, moving an object, attenuation, etc. I use the same timer for several dolls in the same view at different times. How can I declare and revoke or release my timers properly?
Atm Im announces timers as follows:
fadeTimer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(bortInfo) userInfo:nil repeats:YES];
and as soon as im won't use it, follow these steps:
[fadeTimer invalidate]
fadeTimer = nil;
The hold counter when im leaving the view is 0 on each timer. Should I release a timer in dealloc? My application works well, but it crashes from time to time.
ClockTimer, which I use to update tags using time, uses
[[NSRunLoop mainRunLoop] addTimer:clockTimer forMode:NSRunLoopCommonModes];
Do I need to do anything with this mainLoop after I do invalidate clockTimer?
, , .
!