ARC自动发布,没有池 [英] ARC Autoreleased with no pool in place
本文介绍了ARC自动发布,没有池的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在代码中使用ARC,但出现错误
I am using ARC in my code and I am getting the error
Object 0x781b8e0 of class __NSCFString autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug
它所在的行是
return UIApplicationMain(argc, argv, nil, NSStringFromClass([HomePageAppDelegate class]));
由于我使用的是ARC,因此无法像往常一样在其周围放置一个NSAutoReleasePool
.我可以使用什么来解决此错误?
Since I am using ARC I cannot put an NSAutoReleasePool
around it like I usually would. What can I use in order to fix this error?
推荐答案
在显示warning
@autoreleasepool{
}
这篇关于ARC自动发布,没有池的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文