[NSTimer scheduledTimerWithTimeInterval:0.033 target:self selector:@selector(gameLoop)
userInfo:nil repeats:YES];
I don’t do anything to dealloc or kill this timer after starting it.
Is it safe? Or will it cause me to leak memory?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It shouldn’t leak memory. You’re not retaining the timer. The run loop will retain it (I think), but it’ll release it when it no longer needs it.