There are many Cocoa methods that require an NSError object as a parameter to a method, but are really a means of returning an error object to the calling method if errors exist. Is this returned object retained? That is, in the calling object code (the method to which the error is returned), does there need to be some code like:
NSError *error;
[apiCall .... error:&error];
if (error){
[*error release];
}
I haven't seen this anywhere, and if it does need to be released, is this the way to do it?