All posts filed under “NSTimer

comments 5

#9 How to invalidate NSTimer properly?

NSTimer is a useful little one. It waits for some time and then fires, can fire periodically and runs in the run loop. There is also one unexpected feature. NSTimer retains its target. It’s not a big deal when you use a non-repeating timers as they get invalidated automatically after firing. However, when you use a repeating timer and forget…