开发者

XCode 4.2 and ARC, why is it not turned on for me?

I just installed XCode 4.2, according to to everything I have read ARC is turned on automatically, and you have to go to build phases and flag the files where you want to manage memory by yourself, which I have not done, yet it works like if开发者_JAVA技巧 I had.

The weird thing is that everything is still working fine for me, just like if I was still working with XCode 4, is this normal?. From what I read I am supposed to get thousands of warnings because I can no longer use release, retain and autorelease but I am not.


Since ARC is a build setting, I don't know how it should be turned on by default. It's always on for new project but I guess you are talking about existing ones. You can check if it's turned on under BuildSettings (check All) Objective-C Automatic Reference Counting. Turn it on and you'll get your warnings :)

However, I would highly recommend using Edit->Refactor-> Convert to Objective-C ARC since it's more reliable than migrating you code by your own. You can still choose to chance certain files personally if you like.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜