210 likes | 336 Views
Dive into the essentials of Objective-C programming from WWDC 2010 session by Deng Yuguang. This session covers fundamental concepts like categories and selectors, memory management techniques such as retain, release, and autorelease, and their importance in the design phase. Learn about object ownership, directed acyclic graphs, and the rules of retaining instance variables. Perfect for developers looking to deepen their understanding of iPhone app development and improve their coding skills.
E N D
Copy from WWDC 2010 session 113 Objective-C Primary 邓宇光 iPhone Team
Introduction • Common Concepts • Uncommon ideas • Categories • Selectors • Memory Management • Retain, Release, Autorelease
Selectors • Selectors are data structures that represent a method “slot”name
Memory Management • Using just the right amount of memory and no more • Memory Management starts at the design phase • Object owenership is designed an Directed Acyclic Graph • Ownership arises from simple pattern • Only +alloc, -initXXX, -retain, -copy, +newXXX
Simple Rules • Instance variables are always either • Retained • Not retained • Downlinks are retained • Uplinks are not retained
FutherReading • http://developer.apple.com/videos/wwdc • Blogs • http://www.mikeash.com/pyblog • http://www.cnblogs.com/studentdeng