If an iOS device cannot successfully [NSObject alloc] (because it is out of memory), will it return nil, throw an exception, or will the OS terminate the app?
views:
148answers:
1
A:
There are stages. You will receive memory warnings when the device is running low on memory. You see these in template classes as -(void)didReceiveMemoryWarning
methods. This is the place where you release anything you don't need, and it's also where the OS starts unloading objects.
The second stage is that your application is terminated.
Kalle
2010-06-29 12:48:15