Tewha.net Mostly about iOS.

Objective-C memory management

With Automatic Reference Counting (ARC) coming out soon, you could argue this post is coming almost too late. But there’s a lot of confusion over this, and I don’t think ARC will help much if you don’t understand the why of memory management.

After a couple years, I’ve come to adopt some very simple rules for memory management.

Concepts

The first step is to pick up a few concepts that will help you as you code.

Practical guidelines

But how does this translate to code? There’s a few specific and concrete things you can do to make this easier on yourself: