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

jas*_*ark 2 iphone memory-leaks memory-management xamarin.ios

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

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

当我将我的应用程序提交给iTunes时,这是苹果公司将要关注的事情(我还没有这样做)?

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

Geo*_*ton 6

您正在显式创建(非线程池)线程上创建NSObject.你必须包装线程

using (var pool = new NSAutoreleasePool ()) {
  // thread work goes here
}
Run Code Online (Sandbox Code Playgroud)