Home / iPhone Tips and Tutorials

Runtime, Managing Memory, and Using Properties

  • What you will be doing is customizing and extending the behavior of framework classes. You customize and extend the behavior of these classes through subclassing, delegation, and a powerful Objective-C feature called properties.
  • Second, on the iPhone, like any other device, you create objects to do your bidding - which means that you allocate memory - a scarce resource on the iPhone. Running out of memory is the main cause of applications crashing (not to mention being rejected from the App Store), so you need to understand memory management.
  • And finally, to know what message to send to what objects at what time, and what messages will be sent to your app at runtime, you need to understand the application life cycle.

Dealing with these three aspects of writing iPhone Apps is your pass to the Successful iPhone Programmers Secret Society, and in this article, you start your initiation. And because you'll find all this easier to understand if you understand the overall context, begin with the application life cycle.

Warning
This article is like the "Classic Comics" version of several hundred pages of Apple documentation, reference manuals, and how-to guides. Although a lot is left unsaid (though less than you might suspect), what's in this article is enough to get you started and also to keep you going as you develop your own iPhone apps. It provides a frame of reference on which you can hang the concepts - as well as the groundwork for a deep enough understanding of the application life cycle to give you a handle on the detailed documentation.