Under automatic reference counting, why are retain, release, and dealloc not allowed?

前端 未结 4 1646
忘掉有多难
忘掉有多难 2020-11-28 10:08

When trying to use -retain, -release, and -dealloc while building my application using automatic reference counting in Xcode 4.2, I ge

4条回答
  •  不知归路
    2020-11-28 11:10

    in response to AliSoftware: we CNA mix ARTC and not-ARC frameworks, and also arc and not-ARC source.

    (I did it..)

    The basic ideas are: 1) compiler will insert/remove calls as a very-very-good cocoa programmer can do 2) cocoa is ANYWAY C code, so we have separate compilations, so the linker CAN link binaries produced by multiple sources. Think it as we can mix asm and cocoa, or C and pascal...

    in main opinion the Appleadvantege over c# / java is here: we are alway allows to mix, and, using a COMPILER technique 8non a runtime..) we can rush performance beyond.

提交回复
热议问题