在iOS工程中利用ARC来管理内存已经很常见了,但有些比较老的项目不支持ARC的时候必须手动对这些文件进行修改:
It is possible to disable ARC for individual files by adding the
|
1
|
-fno-objc-arc
|
compiler flag for those files.
You add compiler flags in Targets -> Build Phases -> Compile Sources. You have to double click on the right column of the row under Compiler Flags. You can also add it to multiple files by holding the cmd button to select the files and then pressing enter to bring up the flag edit box.
本文介绍如何在不支持ARC的iOS项目中手动管理内存。通过在特定文件中添加-fno-objc-arc编译器标志来禁用ARC,可以在不受ARC影响的情况下继续使用旧的内存管理方式。
5890

被折叠的 条评论
为什么被折叠?



