Commit cd3aa018 authored by Ehren Metcalfe's avatar Ehren Metcalfe

Fix resource leak with iOS camera due to failure to remove AVCaptureSession…

Fix resource leak with iOS camera due to failure to remove AVCaptureSession input/outputs on stop (Bug #3389)
parent 9a5e9d34
......@@ -193,6 +193,14 @@
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
for (AVCaptureInput *input in self.captureSession.inputs) {
[self.captureSession removeInput:input];
}
for (AVCaptureOutput *output in self.captureSession.outputs) {
[self.captureSession removeOutput:output];
}
[self.captureSession stopRunning];
self.captureSession = nil;
self.captureVideoPreviewLayer = nil;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment