News for hackers. Stuff that matters.
Re:Windows NT Kernel Contributor Explains Why Performance is... by gurkendoktor on Saturday May 11, 2013 @11:19AM (#5690854)
> Apple's ARC is a compiler hack. It only works if you happen to use set of Cocoa libraries that are recognized by the compiler

I don't understand. How does ARC rely on more than what NSObject provides? I'm coming from the C++ shared_ptr world and ARC does not feel much different so far (less explicit, but easier to optimise).

Re:Windows NT Kernel Contributor Explains Why Performance is... by pjmlp on Saturday May 11, 2013 @06:04PM (#5692273)
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.

Re:Windows NT Kernel Contributor Explains Why Performance is... by astrange on Saturday May 11, 2013 @09:30PM (#5692775)
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.

Re:Windows NT Kernel Contributor Explains Why Performance is... by mikeash on Saturday May 11, 2013 @10:29PM (#5692879)
What part of that is supposed to explain your rather bizarre claim that ARC only works with special Apple libraries?
Re:Windows NT Kernel Contributor Explains Why Performance is... by pjmlp on Sunday May 12, 2013 @01:30AM (#5693268)
> The compiler understands Objective-C methods that return Core Foundation types follow the historical Cocoa naming conventions
Re:Windows NT Kernel Contributor Explains Why Performance is... by mikeash on Sunday May 12, 2013 @09:40AM (#5694169)
That's very much an uncommon special case, though. You don't need that to use ARC, and rarely come across it.
Re:Windows NT Kernel Contributor Explains Why Performance is... by mikeash on Saturday May 11, 2013 @12:22PM (#5691082)
It doesn't even rely on NSObject. Any root class that provides a compliant implementation of retain, release, and autorelease will work with ARC.