‘NSAutoreleasePool‘ is unavailable: not available in automatic reference counting mode 解决

错误如下:

出现上面错误原因是因为NSAutoreleasePool不支持在ARC模式下使用.

官方说明如下:

 解决方案: 

在工程中禁用ARC

关闭ARC后错误消失 

 

@autoreleasepool 不管ARC是否开启或者禁用都可用,建义使用@autoreleasepool块来代替NSAutoreleasePool

猜你喜欢

转载自blog.csdn.net/fittec/article/details/134888732