I am getting a "Received memory warning. Level = 1" when I use UIImagePickerControllerSourceTypeCamera.
If i access the camera immediately after entering the application, I get "Received memory warning. Level=1" but when i select the camera option after accessing all the other functionality in the application, the app crashes while the debugger console displays
Received memory warning. Level=1 Program received signal: “EXC_BAD_ACCESS”.
Why does this happen? I don't get any memory leaks notification when I build and analyze.
if(actionSheet.tag == 1){
addButton.enabled = YES;
UIImagePickerController * picker = [[[UIImagePickerController alloc] init] autorelease];
picker.delegate = self;
if (buttonIndex == 0)
{
NSLog(@"selecting camera");
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentModalViewController:picker animated:YES];
}
else if (buttonIndex == 1){
NSLog(@"choosing album");
picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
[self presentModalViewController:picker animated:YES];
}
else
{
//NSLog(@"cancel");
}
}