ARC forbids autorelease?

后端 未结 4 2081
一向
一向 2020-12-22 07:56

New to ios and trying to return an NSString from an function. As I understand, I need to [NSString... alloc] init] in order to create the string for return. Al

4条回答
  •  天涯浪人
    2020-12-22 08:37

    ARC = automatic reference counting = the compiler adds the necessary releases and autorelases based on its analysis of your code. You don't see this of course because it happens behind the scenes. As mentioned by sosbom in his comment, you really should read the applicable documentation on the Apple website.

提交回复
热议问题