markjnet

Memory Management Basics Tutorial Video

This article is a screen cast video of my tutorial for beginner iPhone programmers, it’s about the basics of memory management in Objective-C. Memory management is a tough nut for the beginner to crack, particularly in Objective-C and Cocoa for iPhone. Check out my iPhone memory management reading list for more voices on memory management.

The tutorial covers: Objective-C object retain counts; using retain, release, and autorelease; explains the autorelease pool in detail and how it works with the event loop; rule of thumb for if an object is in the autorelase pool.



Part 1: retain counts



Part 2: auto-release pool and the event loop



Part 3: auto-release pool and the event loop with retain



Part 4: auto-release pool wrap up



Part 5: properties, dealloc, bugs, auto-release rule of thumb

Thanks for watching!

[Slashdot] [Digg] [del.icio.us] [StumbleUpon]

Comments

13 Responses to “Memory Management Basics Tutorial Video”
  1. Maniacdev says:

    Wow, nice screencast, hopefully I can someday get to this quality, great job.

  2. Anders Whe says:

    Hey, many thanks for these great great videos. The best memory tutorials i have seen round the net!

  3. Hey Mark, thanks for the awesome screencasts. I’ve been looking for an explanation of the basics of memory management like this for quite a while — great job! You explain things in a very clear, easy-to-understand way.

  4. mike says:

    Great videos, thanks!

  5. Mike Lee says:

    These are great videos. I have been pulling my hair out with memory management issues in an iPhone app an this really helped a TON!!!

  6. Some Guy says:

    A couple of notes on your “retain count” slide. The retain count doesn’t keep any kind of count of other objects, it just records how many -retain messages have been received. There’s nothing bidirectional here.

    Secondly, it’s not correct to say that “objective-c” deletes the object from memory. NSObject’s -dealloc method does that, not the obj-c runtime.

  7. gord says:

    Excellent series of videos – very well presented. Thanks. I just read Programming in Objective-C 2.0 by Kochan, and these videos really help to solidify the material I learned from the book.

Trackbacks

Check out what others are saying about this post...
  1. [...] You can find the rest of the videos on Mark’s site at: Memory Management Basics Video Tutorial – Click Here [...]

  2. [...] Memory Management Basics Tutorial Video Always the bane of the iPhone developer’s existence, brush up on the basics of memory management for Objective-C. [...]

  3. [...] Memory Management Basics Tutorial Video | markjnet (tags: iphone_dev iphone_tutorial iphone_video_tutorial) [...]

  4. [...] When you creating objects by “alloc”, don’t forget to release it. But never don’t call dealloc derectly. For more information about memory management: Memory Management Basics Tutorial Video. [...]

  5. [...] Managements Basics tutorial video by Mark Johnson: http://www.markj.net/iphone-memory-management-tutorial-video/ September 11th, 2009 | Tags: app, apple, cocoa, iphone sdk, Objective-C, xcode | Category: [...]



Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

  • Categories

  • markjnet