1 / 21

Mastering Objective-C: Understanding Memory Management and Selectors in iPhone Development

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.

viveca
Download Presentation

Mastering Objective-C: Understanding Memory Management and Selectors in iPhone Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Copy from WWDC 2010 session 113 Objective-C Primary 邓宇光 iPhone Team

  2. Introduction • Common Concepts • Uncommon ideas • Categories • Selectors • Memory Management • Retain, Release, Autorelease

  3. Common Concepts

  4. Selectors • Selectors are data structures that represent a method “slot”name

  5. 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

  6. Directed Acyclic Graph

  7. Simple Rules • Instance variables are always either • Retained • Not retained • Downlinks are retained • Uplinks are not retained

  8. FutherReading • http://developer.apple.com/videos/wwdc • Blogs • http://www.mikeash.com/pyblog • http://www.cnblogs.com/studentdeng

More Related