You are missing what actually happens in this code when a variable is passed by reference and assigned in an ARC program. Take for example a function (BOOL)save:(NSError * __autoreleasing *)error
In non-ARC Programming, the save function looks like this:
- (BOOL)save:(NSError * __autoreleasing *)myError {
*myError = [[[NSError error] retain] autorelease]
}
In ARC Programming, the save function looks like this:
- (BOOL)save:(NSError * __autoreleasing *)myError {
*myError = [[NSError alloc] init];
}
Despite what the ARC code looks like, both save functions create an error object that has been retained and autoreleased.
This is because in the ARC version, the type of pointer that myError is determines what happens with the memory management of the error object. In effect, as long as the pointer is type __autoreleasing, the *myError assignment line is replaced with
*myError = [[[NSError error] retain] autorelease]
at runtime.
So if we were somehow able to pass in a pointer of the wrong type, for example __strong to the save function, it would cause the save function to do the wrong thing.
Since the compiler will prevent this from happening by creating a temporary variable, the code will work either way, but passing in a pointer of type other than __autoreleasing doesn't make sense from an ARC programming perspective.