Don't leak processors

pull/82/head
Mattia Iavarone 8 years ago
parent 489677366d
commit 592bd05259
  1. 9
      cameraview/src/main/java/com/otaliastudios/cameraview/CameraView.java

@ -580,9 +580,14 @@ public class CameraView extends FrameLayout {
mCameraController.stop(); mCameraController.stop();
} }
/**
* Destroys this instance, releasing immediately
* the camera resource.
*/
public void destroy() { public void destroy() {
// TODO: this is not strictly needed clearCameraListeners();
clearCameraListeners(); // Release clearFrameProcessors();
mCameraController.stopImmediately(); mCameraController.stopImmediately();
} }

Loading…
Cancel
Save