Q: while applying overlay images to image which is taken from camera at that time app will terminates in ios taking an image either from gallery or camera.which is converts into pencil sketch when we applying overlays to image.At this time my app is crashing due to memory leak.getting image from gallery is fine .but taking image from camera and apply overlay images to pencil sketch image at this case only app terminates .please anybody help me
thank you in advance

A: If you use UIImagePickerControllerEditedImage instead of UIImagePickerControllerOriginalImage you will solve this type of memory leaks. Please refer this tutorial for your reference.
UIImage *chosenImage = info[UIImagePickerControllerEditedImage];

