title: UIImagePickerControllerSourceTypeCamera hogging up memory
body: <p>I am using the UIImagePickerController in order to let the user select an image in my app by either taking a new pic or selecting an image from the gallery. Using gallery, the app works fine. But if I use the camera as a source, the app uses up a lot of memory and eventually gets killed after becoming terribly slow.</p>
  
  <p>Can someone please tell me the optimum way to use UIImagePickerControllerSourceTypeCamera.</p>
  
  <p>This is the code I am using</p>
  
  <pre><code>if(![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
      return;
  picker = [[UIImagePickerController alloc] init];
  picker.sourceType = UIImagePickerControllerSourceTypeCamera;
  picker.delegate = self;
  [[self navigationController] presentModalViewController:picker animated:YES];
  [picker release];
  </code></pre>