private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (faceModelBuilder != null) { faceModelBuilder.Dispose(); faceModelBuilder = null; } if (hdFaceFrameReader != null) { hdFaceFrameReader.Dispose(); hdFaceFrameReader = null; } if (bodyFrameReader != null) { bodyFrameReader.Dispose(); bodyFrameReader = null; } if (faceModel != null) { faceModel.Dispose(); faceModel = null; } if (kinect != null) { kinect.Close(); kinect = null; } }
public void Dispose() { if (_faceModel != null) { _faceModel.Dispose(); _faceModel = null; } }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (_faceModel != null) { _faceModel.Dispose(); _faceModel = null; } GC.SuppressFinalize(this); }
private void Page_Unloaded(object sender, RoutedEventArgs e) { if (_faceModel != null) { _faceModel.Dispose(); _faceModel = null; } GC.SuppressFinalize(this); }
protected virtual void Dispose(bool disposing) { if (disposing) { if (currentFaceModel != null) { currentFaceModel.Dispose(); currentFaceModel = null; } } }
private void Window_Closing_1(object sender, CancelEventArgs e) { if (_faceModel != null) { _faceModel.Dispose(); _faceModel = null; } GC.SuppressFinalize(this); _sensor.Close(); }
void IFaceCamera <System.Drawing.PointF> .Stop() { if (_bodyReader != null) { _bodyReader.Dispose(); _bodyReader = null; } if (_faceReader != null) { _faceReader.Dispose(); _faceReader = null; } if (_faceReaderHighDef != null) { _faceReaderHighDef.Dispose(); _faceReaderHighDef = null; } if (_faceSource != null) { _faceSource.Dispose(); _faceSource = null; } if (_sensor != null) { _sensor.Close(); _sensor = null; } if (_faceModel != null) { _faceModel.Dispose(); _faceModel = null; } }
private void Page_Unloaded(object sender, RoutedEventArgs e) { if (_colorReader != null) { _colorReader.Dispose(); _colorReader = null; } if (_bodyReader != null) { _bodyReader.Dispose(); _bodyReader = null; } if (_normalFaceReader != null) { _normalFaceReader.Dispose(); _normalFaceReader = null; } if (_normalFaceSource != null) { _normalFaceSource = null; } if (_faceModel != null) { _faceModel.Dispose(); _faceModel = null; } GC.SuppressFinalize(this); if (_sensor != null) { _sensor.Close(); } }
public void Dispose() { FaceModel?.Dispose(); ModelParams?.Dispose(); GazeAnalyzer?.Dispose(); }