Object-C Development tutorial -- MRC and ARC hybrid editing, object-c -- mrc
After iOS5.0, you can use ARC (Automatic Reference Counting: Automatic Reference count) to replace the previous MRC (Manual Reference Counting: Manual Reference count ). Using ARC reduces the trouble of code and forgetting to release objects. But everything has two sides. If you want to reuse the previously written MRC class after using ARC, an error will be reported. What should I do at this time? The method is relatively simple. You only need to perform the following steps to solve the problem:
Under Compile Sources under the build phases option of targets, select a file to be compiled using arc, double-click it, and enter-Fno-objc-arc
You can.
The ARC class can also be used in the MRC project. The method is as follows:
Under Compile Sources under the build phases option of targets, select the file to be compiled using arc, double-click it, and enter-fobjc-arc.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.