Monday, October 19, 2009

iPhone Development Basics - Memory Management Part 3

In our previous articles on iPhone memory management:
iPhone Development Basics - Memory Management Part 1
iPhone Development Basics - Memory Management Part 2
we've seen how developers allocate and de-allocate memory. And we've created some questions, for developers, on how crashes may occur when memory is not handled correctly. In today's video, the author, Mark Johnson introduces a variation on these things called "Autorelease pools". In the video, he shows how an object that is part of an autorelease pool can be retained despite releasing the entire pool. Seems to me that this could cause problems if not handled correctly.

Suggested questions for Part 3:
I've heard about a way to retain individual UI objects when releasing memory using autorelease pools. Do we do that and can you explain why you would retain something when it's part of an autorelease pool?


0 comments:

Post a Comment