I am not sure if I understood the term "memory leak" correctly. Does this mean that you are freeing up memory incorrectly, and then when my application shuts down, unused memory is not used?
No; a memory leak is a memory leak while the application is still running, since OS X recovers all memory when the application terminates. If this were not so, it could cause huge problems due to poor coding and memory management and would affect the whole system.
It is mainly about saving an object too much or not freeing up enough memory. For example, when adding objects to an array, this is the usual way to do this:
NSMutableArray *array;
Assuming that someObject been correctly allocated, it will start with a hold amount of 1. When you add objects to the array, the array calls retain on the object in question, pressing it in this case, 2.
When an array is released, it sends release all of its objects; in this case, the hold counter will be reset to 1 (provided that no one else has saved the object). It is not 0, so someObject still exists. If someObject was a local pointer created inside the method, and you no longer had a pointer to this object, then there would be memory there. This is an example of a memory leak and leads to the fact that your application uses more memory than necessary and will suffer until it is completed.
source share