iosmemory-managementmemory-leaks

Leaks when the app terminates


Should I handle leaks when the application terminates, or is it more efficient to let the system handle them? I'm thinking that the system will be reclaiming all the memory anyway, so wouldn't additional efforts to free it be overhead?


Solution

  • Quote by paxdiablo:

    All of the operating systems that I have knowledge of will reclaim conventional memory that had been allocated. That's because the allocation generally comes from a processes private address space which will be reclaimed on exit.

    As far I'm aware this also applies to iOS.

    Apple might however reject your Application. Memory leaks alone are generally no reason to reject application, they might however be the drop that makes the bucket overflow. Proper memory management is good practice and should always be pursued.