I've noticed that when I load a UIImagePickerController and I take a picture with it, didReceiveMemoryWarning
is called. Also, in Instruments, there is a significant memory leak (not by me, I swear!). I've heard that this is a problem with UIImagePickerController but, I'm not sure how to fix it. Here is my implementation of UIImagePickerController.
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; // Create the imagePicker
imagePicker.delegate = self;
imagePicker.allowsEditing = YES; // Allow editing of the images
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentModalViewController:imagePicker animated:YES];
[imagePicker release];
Any ideas? I really don't want to sacrifice such a useful feature.