Answer the question
In order to leave comments, you need to log in
When minimizing an app, iOS does not release memory. How to fix?
Good day! We are writing the first application for iOS (on xcode, one view application), almost everything is ready, but we noticed that if you minimize the application and then expand it, it eats up RAM every time and every time more and more. ARC is used, instruments-> leaks doesn't show anything, but graphs in allocations grow by leaps and bounds. Apparently, these are pictures on buttons, backgrounds, and so on.
I tried to assign images to the buttons not through the editor in xcode, but programmatically and when switching from "scene" to "scene" clean (myButtonImage = nil) - the result does not change. Tell the noob what's wrong? :)
Answer the question
In order to leave comments, you need to log in
In the tools, if you click on leaks / not freed objects, then open the right menu, then the methods in which they occur will be indicated. Further, clicking on these methods will also indicate a specific line of code. And there already deal with specific problems.
By themselves, pictures and backgrounds from the interface of the builder should not leak like that. Most likely the problem is elsewhere.
There was a problem in the line that sets the image on the button:
Despite the fact that after that I write "myUIImage = nil;" The image is still in memory.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question