Answer the question
In order to leave comments, you need to log in
How to clear the memory after the application is running?
Good day.
I am writing a game in Obj-C.
During the passage of the level, the user has the opportunity (button) to start the level again.
When writing this level, many arrays, timers were used, which were called one in another somewhere, and so on. In practice, it turns out that each new attempt, the normal speed of the ball (the main object of the interface) falls before our eyes. I think it's a matter of memory. Therefore, the question is: how to clean up arrays, delete timers, and so on. Maybe there is some special procedure for clearing memory?
Thank you.
Answer the question
In order to leave comments, you need to log in
By no means being an expert on ObjC, I can only advise one thing:
Follow the philosophy of ObjC - the class that owns any object alone should be responsible for its removal, do not forget to send release to all objects that your class owns. Well, in the end, run your code through the appropriate utilities in XCode, it will show you where you have a leak, how much memory you take, how you allocate it and how you clear it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question