Releasing an NSTimer iPhone?

Posted by Conor Taylor on Stack Overflow See other posts from Stack Overflow or by Conor Taylor
Published on 2011-12-17T16:54:00Z Indexed on 2012/04/14 11:29 UTC
Read the original article Hit count: 209

Filed under:
|
|
|
|

I have an NSTimer declared in my .h and in the viewDidLoad of the /m I have the code:

timer = [NSTimer scheduledTimerWithTimeInterval:kComplexTimer target:self selector:@selector (main) userInfo:nil repeats:YES];

I also have [timer release]; in my dealloc.

However when I exit the view and return to it, the timer has not in fact released, it has doubles in speed! How do I solve this & what am I doing wrong???

Thanks

© Stack Overflow or respective owner

Related posts about iphone

Related posts about ios