Remember Memory (IPhone Application Development)

The iPhone OS does not store “changeable” memory (such as object data) on the disk to free up space and then read it back in later when needed. It also doesn’t have garbage collection — which means there is a real potential for memory leaks unless you tidy up after your app. Review and follow the memory rules in topic 6 — in particular, these:
Memory management is really creating pairs of messages. Balance every
alloc, new, and retain with a release.
When you assign an instance variable using an accessor with a property attribute of retain, you now own the object. When you’re done with it, release it in a dealloc method.

Next post:

Previous post: