I have been struggling with this issue for weeks now. I have look online all over the place and found nothing close to this issue other than this 2 outsider links:
https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview/issues/200
https://issues.apache.org/jira/browse/CB-11784
But those are not using the same environment and there is no actual solution to the problem.
Here is a screenshot of my Instrumentals using Xcode 8.3 right after I launch the imagePicker and take a picture:
Here is the code related to the imagePicker:
//initializer on my class
var imagePicker = UIImagePickerController()
//imagepicker setup on ViewDidLoad()
imagePicker.delegate = self
imagePicker.allowsEditing = false
imagePicker.mediaTypes = [kUTTypeImage as String]
if UIImagePickerController.isSourceTypeAvailable(.camera) {
imagePicker.sourceType = .camera
}
else {
print("Sorry this app only supports camera")
}
//function to start picker when click on button
func startPicker(){
self.present(imagePicker, animated: false, completion: nil)
}
//delegate functions
func imagePickerControllerDidCancel(_ picker: UIImagePickerController)
{
imagePicker.dismiss(animated: false, completion: nil)
}
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any])
{
//display photo on view
imagePicker.dismiss(animated: false, completion: nil)
}
Is this a bug on IOS or is there a away to get rid off this memory leak?