Xcode 7.3 cannot create __weak reference in file using manual reference counting

后端 未结 7 1999
清酒与你
清酒与你 2020-12-12 12:50

After updating to Xcode 7.3, it throws the error Cannot create __weak reference in file using manual reference counting in pod files. Has anyone solved this iss

7条回答
  •  心在旅途
    2020-12-12 13:34

    I have found this.

    I guess it's meant delete __weak

    https://forums.developer.apple.com/thread/38934

    Erm, was there ever such a thing as a weak variable reference under MRR [manual retain-release]? "__weak" means one or both of two things:

    1. An unowned reference (i.e. not representing a retain count).

    2. A zeroing reference (i.e. that the runtime zeroes when the referenced object is deallocated).

    #1 doesn't apply to MRR, because you just don't retain the variable anyway.

    #2 doesn't apply to MRR either, because the runtime support is in GC and ARC [automatic reference counting], which you're not using.

    It sounds like the compiler is now just complaining that it can't do what it could never do. (And in the case of an app delegate, you wouldn't be able to tell the difference at run-time, since the app delegate generally is never deallocated.)

提交回复
热议问题