可能重复:
Understanding reference counting with Cocoa and Objective-CiPhone内存管理概念
我在iPhone编程和客观C.内存管理的概念很困惑这是一个iPhone应用程序的性能最有用的概念。我想知道我什么时候应该使用
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init];
和
[obj dealloc]
什么用的保留?它只增加retainCount 1.它对我来说真的是开销。如何retainCount有助于管理内存。帮我解决这个问题。
切勿在不是'super'的东西上调用'dealloc'。不要在' - (void)dealloc'之外使用'[super dealloc]'。哦,永远不要看'retainCount'。 –
感谢您的链接.. – MouseCrasher