예제 #1
0
 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;
     }
 }
예제 #2
0
 public void Dispose()
 {
     if (_faceModel != null)
     {
         _faceModel.Dispose();
         _faceModel = null;
     }
 }
예제 #3
0
        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);
        }
예제 #5
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (currentFaceModel != null)
         {
             currentFaceModel.Dispose();
             currentFaceModel = null;
         }
     }
 }
예제 #6
0
        private void Window_Closing_1(object sender, CancelEventArgs e)
        {
            if (_faceModel != null)
            {
                _faceModel.Dispose();
                _faceModel = null;
            }

            GC.SuppressFinalize(this);
            _sensor.Close();
        }
예제 #7
0
        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;
            }
        }
예제 #8
0
        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();
            }
        }
예제 #9
0
 public void Dispose()
 {
     FaceModel?.Dispose();
     ModelParams?.Dispose();
     GazeAnalyzer?.Dispose();
 }