I wonder if anyone could help me with a design/layout question. If you come to a point in your code where you want to stop execution and return an error how do you approach cleaning up? do you simply duplicate that code as I have done here, or is there another way?
if(fileContents == nil) {
NSLog(@"ReadError: %@", [fileError localizedDescription]);
[pool drain];
return 1;
} else {
NSLog(@"Success : %@", fileContents);
}
// Clean up
[pool drain];
return 0;
}
// END
gary