PDA

View Full Version : Automatic Reference Counting ?




Branskins
Jun 6, 2011, 04:33 PM
On the iOS 5 technology page in the dev center it says:
Automatic Reference Counting (ARC) for Objective-C makes memory management the job of the compiler. By enabling ARC with the new Apple LLVM compiler, you will never need to type retain or release again, dramatically simplifying the development process, while reducing crashes and memory leaks. The compiler has a complete understanding of your objects, and releases each object the instant it is no longer used, so apps run as fast as ever, with predictable, smooth performance.

Was this in there before?



robbieduncan
Jun 6, 2011, 04:34 PM
Sounds very cool. All the advantages of garbage collection without the overheads!

jnoxx
Jun 7, 2011, 03:16 AM
So this means alot more newbie developers will have a try to this iOS development. oh oh.. :apple:

Branskins
Jun 7, 2011, 08:52 AM
Watch out :p

MattInOz
Jun 7, 2011, 06:57 PM
So this means alot more newbie developers will have a try to this iOS development. oh oh.. :apple:

Or experienced developers getting to the nut of the problem quicker.
So the value comes from solving problems for either group, not just from understanding an obscure language.

I know I'm bring forward joining the Dev Program as a newbie because of lots of new API's hinted at in iOS5 that i think are going to make the job of creating the function I want easier. Maybe easier is the wrong word, more direct.

robbieduncan
Jun 8, 2011, 06:26 AM
From the quick scan-through of the documentation there are almost as many rules required for this as there are for the existing memory management rules (which are actually very simple and easy to follow) :p

odedia
Jun 10, 2011, 09:22 AM
From the quick scan-through of the documentation there are almost as many rules required for this as there are for the existing memory management rules (which are actually very simple and easy to follow) :p

You just need to stay pure Objective-C and use properties as much as possible. Really not that hard.

robbieduncan
Jun 10, 2011, 10:10 AM
You just need to stay pure Objective-C and use properties as much as possible. Really not that hard.

For many I suspect that will be just fine. I have a bit of an issue that I use singletons quite a lot (I suspect this is a stylistic error with my code) and have old-school singletons that follow Apple's recommended code for this from a couple of years back where I override release/autorelease etc thus breaking ARC.

ViviUO
Jun 10, 2011, 10:35 AM
So this means alot more newbie developers will have a try to this iOS development. oh oh.. :apple:

You say this as if it's a bad thing. Are people not supposed to learn new things? :confused:

If that is in fact what you mean, get over yourself.