public override void Dispose() { sess?.Dispose(); sess = null; model?.Dispose(); model = null; }
void Reset() { // let everything go in reverse order, taking care to dispose _session.Dispose(); _session = null; _model.Dispose(); _model = null; }
public void CleanUp() { if (!_isInitialized) { throw new InvalidOperationException("Service not initialized."); } CameraService.Current.SoftwareBitmapFrameCaptured -= Current_SoftwareBitmapFrameCaptured; _current = null; _model.Dispose(); _session.Dispose(); _model = null; _session = null; Debug.WriteLine("The evaluation event handler should have been removed"); _isInitialized = false; }
public void Dispose() { session?.Dispose(); model?.Dispose(); }