How memory management is done in objective C?
The latest OS X and IOS versions (IOS 5, OSX 10.7 and above) supports Automatic Reference Counting (ARC), a memory management enhancement in Objective C. Before that programmers have to follow the Manual Retain Release procedure. Go through the slides below to understand Memory Management in Objective C with reference to IOS and Cocoa. Also learn about the introduction of ARC and how it works.
– About Memory Management and IOS, OSX versions
– Reference Counting
– Taking ownership of an Object
– Relinquishing ownership of an Object
– Memory Leak and Dangling pointer
– Strong, Retain and Copy
– Autorelease method
– Autorelease pools
– Automatic Reference Counting
– Zeroing Weak References
– Garbage Collector
Written By: Neha Gupta