private void DisposeResources() { if (scanView != null) { scanView.Dispose(); scanView = null; } view = null; RemoveAllViews(); GC.Collect(); }
private void DisposeResources() { if (scanView != null) { scanView.Stop(); scanView.CameraView.ReleaseCameraInBackground(); scanView.CameraOpened -= ScanView_CameraOpened; scanView.Dispose(); scanView = null; } view = null; RemoveAllViews(); GC.Collect(); }
protected override void Dispose(bool disposing) { base.Dispose(disposing); try { _isInitialized = false; if (_scanView != null) { _scanView.Dispose(); _scanView.CameraOpened -= ScanView_CameraOpened; _scanView.CameraError -= ScanView_CameraError; _scanView = null; GC.Collect(); } } catch (Exception) { } Finish(); }
private void GoBack() { try { _isInitialized = false; if (_scanView != null) { _scanView.Stop(); _scanView.CameraView.ReleaseCamera(); _scanView.CameraOpened -= ScanView_CameraOpened; _scanView.CameraError -= ScanView_CameraError; _scanView.Dispose(); _scanView = null; GC.Collect(); } } catch (Exception) { } Finish(); }