3

我有一个应用程序,我没有在整个应用程序中使用 ARC。但是在某些视图控制器中,我通过 compler 标志使用它-fobjc-arc。我不知道它会如何工作,以及它的优点和缺点,这是一个好的技术吗?这样做有什么不利影响吗?任何机构都可以有这种经历吗?有谁能够帮助我?。另外我正在使用 Xcode 4.2 和 LLVM compiler3.0。它实际上是一个非弧视图控制器。但是我添加了编译器标志。并删除了版本的编译错误。够了吗

4

3 回答 3

2
于 2013-03-06T09:20:01.380 回答
2

There will be no issues with this approach.

ARC is a compile-time feature, it'll insert retain, release calls in your arc code at the compile time.

So your arc code will be same as your non-arc code after compilation. So I think there will be no issues with this approach.

But converting the entire project to ARC will be the best approach, because you don't need to worry about the retain, release calls

于 2013-03-06T09:23:59.590 回答
0

However i found this to be extremely tricky and find this article is a well written example for my cause.http://www.codeography.com/2011/10/10/making-arc-and-non-arc-play-nice.html

于 2013-03-06T13:08:06.713 回答