tciuro/NanoStore

Use __autoreleasing annotation on (NSError **) method params

billgarrison opened this issue · 1 comments

For methods that return an NSError by reference, the method signature is declared using (out NSError **)error.

Using the __autoreleasing annotation instead would help out clang when ARC is enabled.

(NSError * __autoreleasing *)error

Here's some discussion of this annotation on Stack Overflow.

http://stackoverflow.com/questions/8862023/in-which-situations-do-we-need-to-write-the-autoreleasing-ownership-qualifier

I'm not sure if the out parameter annotation actually buys anything useful outside of Distributed Objects.

Thanks Bill. IIRC, it was a remnant when I was dealing with the PyObjC bridge back in the QuickLite days. Thanks for pointing this out.