Why does NSObject's “isMemberOfClass:class” specify __unsafe_unretained in XCode's autocompletion?

后端 未结 1 1223
伪装坚强ぢ
伪装坚强ぢ 2021-01-06 05:30

The vague overview is that I\'m writing a method in an NSArray Category that will take a Class and filter an Array down to elements that are member

相关标签:
1条回答
  • 2021-01-06 06:10

    In the absence of an explicit ownership qualification one is inferred; this is usually __strong but in the case of Class it is __unsafe_unretained. This makes sense as Class objects are immortal and need not be memory managed by your code.

    So Xcode is just making the implicit explicit and you do not need to do this yourself.

    0 讨论(0)
提交回复
热议问题