ARC forbids explicit message send of ' release '
' Release ' is unavailable:not available in automatic reference counting mode Today, this is the kind of problem encountered.
Obviously, it's the arc problem. Error reason: Because we have set up to use ARC to manage memory release, we call the release method to release the object.
what arc is. (I also post a short description on the Internet)
ARC is a new feature of iOS 5, called arc (Automatic Reference counting). Simply put, it is the code that automatically joins the Retain/release, and the code that originally needed to manually add a reference count to handle memory management can be automatically completed by the compiler. This mechanism is started in IOS 5/mac OS X 10.7 and can be used with Xcode4.2. The simple understanding of arc is that by specifying the syntax, the compiler (LLVM 3.0) automatically generates the reference count of the instance when the code is compiled to manage part of the code. At one point, arc is not a GC, it is just a static analyzer tool of code.
Workaround: Look at the picture and speak:
Get.
There is also the case that when an external or third-party library is introduced, some arc support is required, and some do not even need to be allowed. If this is the case, how to set it up.
set arc options separately
respectively to solve the chant. Look at the words:
The input-fobjc-arc that needs to be supported with ARC does not use the ARC mechanism, only the input-fno-objc-arc
Get.