← Back to context

Comment by pjmlp

13 years ago

No, it is an hack.

Just read this document.

https://developer.apple.com/library/mac/#releasenotes/Object...

You need to write code with lots of special cases to be able to have ARC active and not fall into strange compiler errors.

The compiler errors are actually quite clear.

Most of the restrictions (bridge casts and naming methods) are interoperation with non-ARC code, and from working on Java/JNI I can assure you GC<>manual interaction was worse.

It is of course still quite possible to get abandoned memory through retain cycles.

What part of that is supposed to explain your rather bizarre claim that ARC only works with special Apple libraries?

  • > The compiler understands Objective-C methods that return Core Foundation types follow the historical Cocoa naming conventions

    • That's very much an uncommon special case, though. You don't need that to use ARC, and rarely come across it.