iOS5 with ARC ( Automatic Reference Counting )

With iOS5 comes the most important feature for me as a developer, Automatic Reference Counting.
This is may not feel a large announcement from an user’s perspective but as a developer, this is the feature. Well, what does that mean and how it affects me as an iOS application developer? This means no retain and release, yeeeaaaahhooooo. If you are developing for iOS devices till now, the pain of maintaining the reference count of an object is always there till it goes to the appstore. With the ARC, one can now forget those. In other words we can say finally garbage collection is here with iOS5, though its not that from a technical perspective, but from a developers perspective its kind of that.
Here is the official description about all the features of iOS5.
Whatever the announcement is for others, but for a developer it is the most significant release of the iOS till now.

12 thoughts on “iOS5 with ARC ( Automatic Reference Counting )

  1. Too bad that a lot of 3rd party libraries and frameworks still use the old reference counting. So we’re kinda forced to stick with the old ref counting till those 3rd party stuff is updated. :(

    • Thats true Bart Claessens that third party libraries do use the old reference counting methods, but as far as I understand, the new OS and compiler will take care of them also. I mean, there is no harm at all using old libs with new OS, if they are already caring enough to manually reference count, thats good thing, but incase they miss somewhere, the ARC is in place.

  2. Happenend upon your post when searching for info on ARC

    From the documentation, apparently we still need to use allocs, correct?

    I’ve also read that any iOS previous to iOS5 does not support ARC. So any app created using ARC will be restricted to iOS5?

    If the above is true, then personally this sounds terrible to me. I can’t restrict my users to iOS5. My mom has a 3G, she would kill me if she couldn’t get my apps. Beyond that, memory management is ridiculously easy with autorelease, but it feels difficult when you don’t understand how it works. I know for my first year and a half or so of iPhone development, retains and releases were extremely difficult to understand. If ARC code doesn’t work on previous iOSs, then its a no go for me and I’ll stick to my autoreleases.

    • hi ColdLogic,
      thanks for dropping the lines.
      Thats nice and valid point. I think that itself makes the external library makers to use the alloc, retain, release methodology. Autorelease is nice but as you said, it takes time to get used to the inner working of the SDK.
      This came to an eye opener for me as what Apple is upto now! Are they going to stop support for all iOS pervious to iOS5 !! Or iOS5 is going to so compatible with all the iDevices (which does not seems to happen though)!

    • As I understood it ARC ist just some compile time magic. So you still will be able to run your apps on older versions of iOS.

      • hi Ewald Dieser,
        thanks for dropping the lines.
        It seems like that only. Need to test it in an old device to know its actually doing the same.

  3. ARC is supported in Xcode 4.2 for Mac OS X v10.6 and v10.7 (64-bit applications) and for iOS 4 and iOS 5.

    • Thanks Thomas for dropping by and sharing informations.
      ohh, really!! Good to know that. Can you share some links to the ARC support in iOS4.

Comments are closed.