Trying to make Arc happy


Gerriet M. Denkmann
 

I just switched on: Implicit ownership types on out parameters = CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE

and now I get complaints about stuff like:

- (BOOL)isNiceAndHas: (NSArray **)friends;

Method parameter of type ‘NSArray *__autoreleasing *' with no explicit ownership

How can I help Arc to understand what is going on? Any annotations to be used?

Gerriet.


 


On Jul 18, 2017, at 1:07 AM, Gerriet M. Denkmann <g@...> wrote:

- (BOOL)isNiceAndHas: (NSArray **)friends;

Method parameter of type ‘NSArray *__autoreleasing *' with no explicit ownership

I think you resolve this by changing it to the form shown in the error messages, i.e.

- (BOOL)isNiceAndHas: (NSArray *__autoreleasing *)friends;

—Jens