Memory Rules on iPhone

April 18, 2009 § Leave a comment

iPhone 3D comes with 128MB of RAM. Majority of RAM is used by OS. This leaves about 40MB for your application. Even if you use 3MB of RAM, you will trigger the memory warnings.

  • no garbage collection
  • for every alloc, retain, copy, you will have to release the memory
  • no automatic objects to help manage memory
  • use autorelease with care as it leaks memory; autorelease will not release until the autorelease pool is released
  • no virtual memory or swap file

Good memory practices are here and here. Stanford Cocoa Programming Course class PDF is here. The offical Apple’s memory management practice is here.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

What’s this?

You are currently reading Memory Rules on iPhone at Web Builders.


%d bloggers like this: