I\'m trying to complete the puzzle.
__strong
is the default for all Objective-C retainable object pointers like NSObject, NSString, etc.. It\'s a strong
The definitive ARC specification says that
For __autoreleasing objects, the new pointer is retained, autoreleased, and stored into the lvalue using primitive semantics.
So for example, the code
NSError* __autoreleasing error = someError;
actually gets converted to
NSError* error = [[someError retain] autorelease];
... which is why it works when you have a parameter NSError* __autoreleasing * errorPointer
, the called method will then assign the error to *errorPointer
and the above semantics will kick in.
You could use __autoreleasing
in a different context to force an ARC object into the autorelease pool, but that's not terribly useful since ARC only seems to use the autorelease pool at method return and already handles that automatically.