How do I know if my program has ARC enabled or not?

前端 未结 4 588
情歌与酒
情歌与酒 2021-01-31 20:41

I create a project with ARC support using the Xcode project wizard. Compared with a program without ARC support, I did not notice any differences. Is there any hint that can tel

4条回答
  •  面向向阳花
    2021-01-31 21:16

    Or to test just once, add this in your code:

    NSString* dummy = [[[NSString alloc] init] autorelease];
    

    This should raise an error if you are using ARC. If it does, ARC is enabled, all is fine and you can remove it again.

提交回复
热议问题