Merge pull request #2816 from ehren:avcapturesession_leak

pull/2770/merge
Vadim Pisarevsky 11 years ago
commit 7cefaa49dd
  1. 8
      modules/highgui/src/cap_ios_abstract_camera.mm

@ -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;

Loading…
Cancel
Save