Does iPhone OS restore user memory on exit?

I read leak detection tools for iPhone development and intentionally insert and look for memory leaks in my small program before I get into a larger and more complex project.

It is impossible to identify a memory leak that, say, occurs in a frequently called method, for example, responding to a touch event. The leak tool will ultimately identify unclaimed virtual memory.

I'm more worried about code leaks to exit the entire system. As soon as I completely exit my application, is it worrying that something has not been released, or does the iphone OS automatically return the entire user mem at that moment?

After reading quite a lot of documentation, this problem is incomprehensible to me and, not knowing anything else, I assume that it should work as another OS in this regard and just return all user space. If so, will I not be good at cleaning up regular leaks, so my application can run for a while with limited memory, and then not worry so much that everything is freed upon exit?

In addition, if it is important to free everything before the release, because it will not be restored by the OS, is there a good way to save my application in the tools after the exit for verification? When I press the home button in the simulator or on the device, I no longer had the opportunity to detect leakage of exit time?

+3
2

, . , , , .

: , , : "iPhone ". . , .

+3

iPhone , ( ) , .

0

Source: https://habr.com/ru/post/1711188/


All Articles