protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (captureSession.Running)
                {
                    captureSession.StopRunning();
                }

                isDisposing = true;
                videoPreviewLayer.Dispose();
                captureDeviceInput.Dispose();
                tesseract.Dispose();
                targetOverlayView.Dispose();
                captureSession.Dispose();
            }
            base.Dispose(disposing);
        }
 public void Tear()
 {
     _api.Dispose();
     _api = null;
 }