Given ARC in iOS 5 Can We Skip This Chapter?


#1

Hey guys,
Just bought iOS Programming and am working my way through it. Great book so far!

The Subject line pretty much says it all. It sounds like Memory Management is handled for us now in iOS 5. Given that, is Chapter 3 even relevant for apps that target iOS 5 and beyond?

Thanks in advance,
mb


#2

It isn’t iOS 5 than handles the memory, but ARC in xCode 4.2. If you use ARC then it handles the memory management in the code for you. If you turn ARC off, then you have to handle the memory management. You can use ARC in xCode 4.2 and compile for an earlier version of iOS and still not worry about memory management. They just happened to both be incorporated into xCode 4.2.

Fred


#3

I’m also a beginner, so I may not be the best person to ask - however it’s probably good to understand memory management even if ARC makes it obsolete.

Here’s a pretty good page that explains what ARC is, what it does and doesn’t do etc.

raywenderlich.com/5677/begin … s-5-part-1


#4

[quote=“scotts7777”]I’m also a beginner, so I may not be the best person to ask - however it’s probably good to understand memory management even if ARC makes it obsolete.

Here’s a pretty good page that explains what ARC is, what it does and doesn’t do etc.

raywenderlich.com/5677/begin … s-5-part-1[/quote]

It’s interesting that the author makes the same mistake that I did, associating ARC w/ iOS 5 (although he does credit the compiler in the next sentence):

“The most disruptive change in iOS 5 is the addition of Automatic Reference Counting, or ARC for short.”


#5

The concepts of this chapter still apply with ARC, it’s just that you don’t have to manually retain and release stuff. Plus, it’s good to understand everything that is going on.