Example #1
0
        void ReleasePreviewLayer()
        {
            if (captureVideoPreviewLayer == null)
            {
                return;
            }

            captureVideoPreviewLayer.Dispose();
            captureVideoPreviewLayer = null;
        }
        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);
        }