ARC and NSError output parameters: proper declaration?
ARC and NSError output parameters: proper declaration?
- Subject: ARC and NSError output parameters: proper declaration?
- From: Sean McBride <email@hidden>
- Date: Mon, 07 Oct 2013 14:44:43 -0400
- Organization: Rogue Research Inc.
Hi all,
I understand the issue with NSError output parameters and ARC, and that it automatically 'adds' an __autoreleasing, but I'm wondering what is the recommended way to declare NSError output parameters in new code these days:
1) No decorations, ex:
- (BOOL)foobar:(NSError **)outError;
2) 'out' tag, ex NSKeyValueCoding.h
- (BOOL)validateValue:(inout id *)ioValue forKey:(NSString *)inKey error:(out NSError **)outError;
3) explicit __autoreleasing
- (BOOL)foobar:(NSError * __autoreleasing *)outError;
Which is preferable? I'm interested both in term of correctness and style/coding standards.
Thanks,
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden