I am using UIImagePickerController for getting image from camera. Just after I capture image and get it by using UIImagePickerControllerOriginalImage getting memory warning. I am using iphone 4s with iOS.
Code is here
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
[self dismissViewControllerAnimated:YES completion:nil];
UIImage* originalImage = [info objectForKey:UIImagePickerControllerOriginalImage];
//Getting memory warning after this line
NSData *data =UIImageJPEGRepresentation(originalImage, 0.1);
}