开发者

Should I learn manual Objective-C memory management, now that ARC is here?

I've started to pick up Objective-C (with no previous prog开发者_StackOverflow社区ramming experience) and I'm working through Kochan's "Programming in Objective-C (3rd Edition)". It's supposed to be a newer edition (it came out in June 2011, just a month ago at time of writing) yet it doesn't reference ARC at all. The code examples in the text use NSAutoReleasePool and release, yet I've found Xcode doesn't want me to use these with ARC implemented.

Should I, as a new programmer, get in the habit of knowing my release pools/manual memory management or should I just stick with ARC?


ARC is very new, announced just July 2011. So his book can no way include the discussion on ARC.

It's always good to know more things to broaden your perspective, so if you're not too confused about memory management, I suggest you to just go on with the book you just bought.

Then you'll be able to appreciate how great ARC is in a few months.

Another reason to advise you to learn the traditional way is that, even with ARC, you need to eventually learn what retain/release is all about, because ARC only takes care of the memory management of the Objective-C part, and some explicit management is necessary when you use non-Objective-C code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜