zoukankan      html  css  js  c++  java
  • Obj-C, library with ARC code and warning

    I'm adding the MKStoreKit to my app and I'm getting a warning, Method possibly missing a [super dealloc] call. I know the library has been converted for the new ARC.

    However, I'm not ready to convert my whole app to ARC.

    How should I proceed?

    Is it safe to use the ignore option, or do I need to add a setting for my app somewhere ?

    Click on the Xcode project in the file navigator on the left of the Xcode window. Now select your app target, and look for the "Build Phases" tab in the main view. Under there, you'll see the "Compile Sources" phase. For each of the files in MKStoreKit, edit the compiler flags in Compile Sources to add:

    -fobjc-arc

    That lets you compile these files correctly with ARC, but carry on using manual reference counting through your own code.

    这个有时候第三方库做的是arc的模式,如果工程中没有设置支持arc那么就会报警内存泄漏库中相应代码。这时候可以单独选择这些文件然后转换成arc格式的就可以了。

  • 相关阅读:
    Servlet Class4
    Servlet Class3
    Servlet Class2
    Servlet Class1
    HTTP基础知识
    XML基础知识
    JAVA Class25
    JAVA Class24
    JAVA Class23
    JAVA Class22
  • 原文地址:https://www.cnblogs.com/lisa090818/p/3491884.html
Copyright © 2011-2022 走看看