Marcel, memory management is an important moment for developing applications for iOS. You should consider reading Apple's documentation on this, as suggested by the other guys.
I can add some information here to try to help you with your needs.
The memory management process with Obj-C is the basis of the count. This means that at any time when you “save” an object, the system improves the counter for this object. For example, if you create a button and save it, it will have the value 1. If you save it again, it will have the value 2. To completely destroy this object, you will need to release it twice. Each time an object is set to 0, it will be destroyed.
My personal opinion: if you want to have good control over the memory management of your application, it is good to explicitly save and destroy your objects, avoiding autoadvertising when possible. Again, this is my personal opinion. I like to know about the memory process inside my applications, so I prefer to take care of it exactly.
Confident that this is not the best way, each developer will prefer to use a different approach that manages memory.
Again: take the time to read the documentation that Abizem offered. Of course, you will have a better understanding.
Trinca
source share