Possible Duplicate:
Understanding reference counting with Cocoa and Objective-C
I am pretty confused in memory management concept of iPhone programming and objective C. It is most useful concept for performance of iPhone Apps. I am want to know that when should I use
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init];
and
[obj dealloc]
What is the use of retain? It just increase the retainCount by 1. Its really overhead to me. How retainCount helps to manage memory. Help me out of this.