Memory management

Memory management in Objective C is different from languages like java, c# which have automatic memory management (garbage collection). Although garbage collection is supported in the runtime environment of Mac OS X, it is not supported in iOS. It has to be done explicitly in iOS. Objective C uses “reference counting” as its main technique for memory management. Reference counting means keep track of number of times object is being referenced. As automatic garbage collection is not performed, developer has responsibility to declare object when needed and to delete it when it is…Read more …