繁体   English   中英

iOS5 ARC应用程序:NSCFNumber类的__NSAutoreleaseNoPool():在没有池的情况下自动释放-只是泄漏

[英]iOS5 ARC app: __NSAutoreleaseNoPool(): of class NSCFNumber autoreleased with no pool in place - just leaking

我最近为我的应用程序项目切换到了ARC。 我正在使用iOS 5 SDK。 运行一台iPod 4g设备我没有收到任何警告。 但是尝试在iPod 2g上运行我的应用程序时,我收到许多警告:

*** __NSAutoreleaseNoPool(): Object 0x258070 of class DataModel autoreleased with no pool in place - just leaking
*** __NSAutoreleaseNoPool(): Object 0x2530a0 of class __NSArrayM autoreleased with no pool in place - just leaking
*** __NSAutoreleaseNoPool(): Object 0x25a2e0 of class NSCFNumber autoreleased with no pool in place - just leaking

我猜想通过使用ARC运行arm6 / arm7代码之间会有区别。

如何解决呢? 谢谢

无论您在单独的线程上做什么,都可以添加@autoreleasepool上下文。

可在此处获得更多信息

在这个相关问题中也有一些不错的例子。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM