Invalidating an NSTimer?
问题 If I have an NSTimer that starts in viewdidload, where is the proper place to invalidate it when leaving that view? Is it also necessary to release it as well? 回答1: If you create a timer with NSTimer scheduledTimerWithTimeInterval... then you don't need to release it, as you don't own it. Now important thing is that the timer class retains the target, and in most cases we use self as the target. If the timer is not repetitive , then after the timer handler is completed, it automatically