{%Pragmatic Coding%} Tips and tricks for software developers.


Automatic Reference Counting (ARC) in iOS 5 – Part 1

This is part 1 on Automatic Reference Counting post. Enjoy!

Few weeks ago I have updated my environment to iOS 5 SDK and xCode 4.2 and was really surprised seeing bunch of new features added to 5th SDK. And today we will talk about one of these features.

Automatic Reference Counting (ARC) is a new feature introduced in iOS 5 SDK for programmers from having to handle memory management by making memory management the job of the compiler.  Instead of you having to remember when to retain or release an object, ARC evaluates the lifetime requirements of your objects and automatically inserts the appropriate method calls at compile time.

Ok, that's cool new stuff and it looks like makes life  easier with automatic reference counting. Great but not so fast, certainly here is a difference between standard [release] [retain] [autorelease] and new way of coding with ARC.
Read the full article...

Tagged as: ARC, iOS Continue reading