protected override void OnPause() { base.OnPause(); GC.Collect(); barcodePicker.StopScanning(); paused = true; }
protected void SetScanState(ScanState state, IScanSession scanSession) { scanState = state; switch (state) { case ScanState.STOPPED: if (scanSession != null) { scanSession.StopScanning(); } else { picker.StopScanning(); } break; case ScanState.SCANNING: if (HasCameraPermission()) { picker.StartScanning(); } else { RequestCameraPermission(); } break; } }
protected override void OnPause() { // Call GC.Collect() before stopping the scanner as the garbage collector for some reason does not // collect objects without references asap but waits for a long time until finally collecting them. GC.Collect(); picker.StopScanning(); base.OnPause(); }
protected override void OnPause() { base.OnPause(); //Chamada do GC.Collect, Garbage Collect não funcionou GC.Collect(); barcodePicker.StopScanning(); paused = true; }
/// <summary> /// Searchs the clicked. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">EventArgs</param> private void SearchClicked(object sender, EventArgs e) { _picker.StopScanning(); _scanedItCamera.EditClicked?.Invoke(); }
public override void DidCancel(ScanOverlay overlay, NSDictionary status) { Console.WriteLine("Cancel was pressed."); presentingViewController.DismissViewController(true, null); picker.StopScanning(); }
protected override void OnPause() { GC.Collect(); picker.StopScanning(); base.OnPause(); }