ARC forbids explicit message send of release-close Xcode Project Arc set this post contains pictures (2012-12-17 22:28:59)

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.