gpt4 book ai didi

iphone - MonoTouch 中的内存泄漏消息 - 我必须处理这些消息吗?

转载 作者:行者123 更新时间:2023-12-03 20:28:57 25 4
gpt4 key购买 nike

我习惯了 ASP.NET,它有垃圾收集器。然而,在进入 MonoTouch 和 iPhone 编程之后,我在运行我的应用程序时发现了许多这样的消息。

我应该忽略它们,还是应该在每个 View Controller 中实现某种卸载方法来处理对象?

当我向 iTunes 提交应用程序时,Apple 人员会看到这种情况吗(我还没有这样做)?

2011-02-12 20:58:55.641 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0xfd34dd0 of class NSPathStore2 autoreleased with no pool in place - just leaking2011-02-12 20:58:55.648 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0xfd3a710 of class NSPathStore2 autoreleased with no pool in place - just leaking2011-02-12 20:58:55.649 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0xfd3a830 of class NSPathStore2 autoreleased with no pool in place - just leaking2011-02-12 20:58:55.650 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0xfd3bae0 of class NSPathStore2 autoreleased with no pool in place - just leaking2011-02-12 20:58:55.651 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0xce8a520 of class NSPathStore2 autoreleased with no pool in place - just leaking2011-02-12 20:58:55.651 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0xce8a5e0 of class NSPathStore2 autoreleased with no pool in place - just leaking2011-02-12 20:58:55.658 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0x7bccd40 of class __NSArrayReverseEnumerator autoreleased with no pool in place - just leaking2011-02-12 20:58:55.659 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0x7bce550 of class __NSArrayI autoreleased with no pool in place - just leaking2011-02-12 20:58:55.659 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0x7bce550 of class __NSArrayI autoreleased with no pool in place - just leaking2011-02-12 20:58:55.660 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0xce8f280 of class NSIndexPath autoreleased with no pool in place - just leaking2011-02-12 20:58:55.664 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0xce90480 of class __NSCFData autoreleased with no pool in place - just leaking2011-02-12 20:58:55.664 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0xce90690 of class UICFFont autoreleased with no pool in place - just leaking2011-02-12 20:58:55.670 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0xce91c30 of class NSIndexPath autoreleased with no pool in place - just leaking2011-02-12 20:58:55.671 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0xfd3a840 of class NSIndexPath autoreleased with no pool in place - just leaking2011-02-12 20:58:55.673 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0x7bcc550 of class CAlertView autoreleased with no pool in place - just leaking2011-02-12 20:58:55.674 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0xce91ca0 of class __NSArrayM autoreleased with no pool in place - just leaking2011-02-12 20:58:55.675 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0x6e87c10 of class _UIAlertOverlayWindow autoreleased with no pool in place - just leaking2011-02-12 20:58:55.675 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0xce90a50 of class UIInputViewSet autoreleased with no pool in place - just leaking2011-02-12 20:58:55.676 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0xce90a60 of class UIInputViewAnimationStyle autoreleased with no pool in place - just leaking2011-02-12 20:58:55.676 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0xce93bf0 of class CABasicAnimation autoreleased with no pool in place - just leaking2011-02-12 20:58:55.677 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0xce93c00 of class NSCFNumber autoreleased with no pool in place - just leaking2011-02-12 20:58:55.677 wps[1200:7803] *** __NSAutoreleaseNoPool(): Object 0xce93a10 of class __NSCFDictionary autoreleased with no pool in place - just leaking

最佳答案

您正在显式创建的(非线程池)线程上创建 NSObject。您必须将线包裹起来

using (var pool = new NSAutoreleasePool ()) {
// thread work goes here
}

关于iphone - MonoTouch 中的内存泄漏消息 - 我必须处理这些消息吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4980856/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com