Possible Duplicate:
In which situations do we need to write the __autoreleasing ownership qualifier under ARC?
making this method in the interface:
- (NSArray *)questionsFromJSON:(NSString *)jsonString
withError:(NSError **)error;
when tabbing out autocomplete in the implementation it’s adding this:
- (NSArray *)questionsFromJSON:(NSString *)jsonString withError:(NSError *__autoreleasing *)error
I figured with ARC there never needs to be the use of autorelease but I’m guessing this is different, as it compiles fine with ARC.
Just curious 🙂
Autorelease is used a lot in ARC. You just don’t see the keyword sprinkled around all over the place.
The example you site, is when you send a pointer to an object pointer, like the typical error scenario…
Note, that the bar method will be doing something like…
Now, the error object has been allocated, and “returned” like an autorelease from a function call. When you declare s function/method to take “**” you are implicitly stating __autorelease.