Oh, I forgot to add - specifically you can either override - [UIViewController didReceiveMemoryWarning] or listen for the (this is from memory, so verify it with the docs) UIApplicationDidReceiveMemoryWarningNotification notification if you need to do something in other than a view controller.

- Bryan

Sent from my iPhone

On Aug 18, 2009, at 7:37 PM, Bryan Henry <bryanhe...@mac.com> wrote:

The proper way to manage large objects that can be easily reloaded as needed is to make sure and respond to memory warnings. The exact amount of memory available to your application depends on both the device (which could vary greatly in terms of hardware resources) and other processes running in the background (like MobileMail, for instance). Luckily for you, the OS handles determining when you're running low on memory and sends notifications to that affect (as well as doing other things).

- Bryan

Sent from my iPhone

On Aug 18, 2009, at 7:34 PM, Jonathon Kuo <newsli...@autonomy.caltech.edu > wrote:

I'm writing an app for the iPhone, but I need to be mindful how much virtual memory there is available to the app when it runs, so I can manage allocing and deallocing some large arrays. I'm guessing that the OS runs in a small amount (100MB?) of flash memory compared to the 16GB or 32GB of general storage memory? Also, is there a system call I can invoke from within my app to determine how large it is getting?

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/bryanhenry%40mac.com

This email sent to bryanhe...@mac.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/bryanhenry%40mac.com

This email sent to bryanhe...@mac.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to