自动释放但没有池

发布于 2024-12-04 03:05:04 字数 1351 浏览 0 评论 0原文

当我在 Xcode 4 模拟器中运行 iPhone 应用程序时,我得到以下输出,我如何知道哪个程序导致了这个问题?

2011-09-08 15:01:03.807 Mobile[1909:ef03] *** __NSAutoreleaseNoPool(): Object 0x5b08150 of class __NSCFArray autoreleased with no pool in place - just leaking
2011-09-08 15:01:03.808 Mobile[1909:ef03] *** __NSAutoreleaseNoPool(): Object 0x5b05fb0 of class NSCFString autoreleased with no pool in place - just leaking
2011-09-08 15:01:03.809 Mobile[1909:ef03] *** __NSAutoreleaseNoPool(): Object 0x5b05fb0 of class NSCFString autoreleased with no pool in place - just leaking
2011-09-08 15:01:03.810 Mobile[1909:ef03] *** __NSAutoreleaseNoPool(): Object 0x581a730 of class __NSArrayI autoreleased with no pool in place - just leaking
2011-09-08 15:01:03.810 Mobile[1909:ef03] *** __NSAutoreleaseNoPool(): Object 0x5b08300 of class __NSCFSet autoreleased with no pool in place - just leaking
2011-09-08 15:01:03.821 Mobile[1909:ef03] *** __NSAutoreleaseNoPool(): Object 0x5a05930 of class __NSDate autoreleased with no pool in place - just leaking
2011-09-08 15:01:03.824 Mobile[1909:ef03] *** __NSAutoreleaseNoPool(): Object 0x5a06000 of class __NSCFTimer autoreleased with no pool in place - just leaking
2011-09-08 15:01:03.824 Mobile[1909:ef03] *** __NSAutoreleaseNoPool(): Object 0x5b09850 of class __NSDate autoreleased with no pool in place - just leaking

I'm getting the following output when I run my iPhone app in the Xcode 4 simulator, how can I know which procedure is causing this?

2011-09-08 15:01:03.807 Mobile[1909:ef03] *** __NSAutoreleaseNoPool(): Object 0x5b08150 of class __NSCFArray autoreleased with no pool in place - just leaking
2011-09-08 15:01:03.808 Mobile[1909:ef03] *** __NSAutoreleaseNoPool(): Object 0x5b05fb0 of class NSCFString autoreleased with no pool in place - just leaking
2011-09-08 15:01:03.809 Mobile[1909:ef03] *** __NSAutoreleaseNoPool(): Object 0x5b05fb0 of class NSCFString autoreleased with no pool in place - just leaking
2011-09-08 15:01:03.810 Mobile[1909:ef03] *** __NSAutoreleaseNoPool(): Object 0x581a730 of class __NSArrayI autoreleased with no pool in place - just leaking
2011-09-08 15:01:03.810 Mobile[1909:ef03] *** __NSAutoreleaseNoPool(): Object 0x5b08300 of class __NSCFSet autoreleased with no pool in place - just leaking
2011-09-08 15:01:03.821 Mobile[1909:ef03] *** __NSAutoreleaseNoPool(): Object 0x5a05930 of class __NSDate autoreleased with no pool in place - just leaking
2011-09-08 15:01:03.824 Mobile[1909:ef03] *** __NSAutoreleaseNoPool(): Object 0x5a06000 of class __NSCFTimer autoreleased with no pool in place - just leaking
2011-09-08 15:01:03.824 Mobile[1909:ef03] *** __NSAutoreleaseNoPool(): Object 0x5b09850 of class __NSDate autoreleased with no pool in place - just leaking

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

何处潇湘 2024-12-11 03:05:04

我在我的主函数中发现了问题,因为我之前放置了一些代码

NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

所以我删除了该代码并将其放在以下行之后

I found the problem in my main function as I placed some code before

NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];

So I removed that code and put after the below line

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文