- (void)didReceiveMemoryWarning {
// Displays an alert message if there is a memory warning
[super didReceiveMemoryWarning];
// NSError *error;
// NSLog(@"Unresolved error %@, %@", error, [error userInfo]); //error log message
UIAlertView *memoryAlert = [[UIAlertView alloc] initWithTitle:@"Low Memory Warning"
message:@"Close some programs!"
delegate:nil
cancelButtonTitle:@"Cancel"
otherButtonTitles:nil];
[memoryAlert show];
[memoryAlert release];
// Release any cached data, images, etc that aren't in use.
}
// Displays an alert message if there is a memory warning
[super didReceiveMemoryWarning];
// NSError *error;
// NSLog(@"Unresolved error %@, %@", error, [error userInfo]); //error log message
UIAlertView *memoryAlert = [[UIAlertView alloc] initWithTitle:@"Low Memory Warning"
message:@"Close some programs!"
delegate:nil
cancelButtonTitle:@"Cancel"
otherButtonTitles:nil];
[memoryAlert show];
[memoryAlert release];
// Release any cached data, images, etc that aren't in use.
}
The alert message could also be used to log an error code or message.