Ejemplo n.º 1
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     update.Abort();
     personData.Dispose();
     personModule.Dispose();
     faceData.Dispose();
     blobData.Dispose();
     sm.Dispose();
 }
Ejemplo n.º 2
0
        private void ShutDown()
        {
            // Stop the Update thread
            update.Abort();

            // Dispose RealSense objects
            blobModule.Dispose();
            blobData.Dispose();
            senseManager.Dispose();
            session.Dispose();
        }
Ejemplo n.º 3
0
        private void Uninitialize()
        {
            if (senseManager != null)
            {
                senseManager.Dispose();
                senseManager = null;
            }

            if (blobModule != null)
            {
                blobModule.Dispose();
                blobModule = null;
            }

            if (blobData != null)
            {
                blobData.Dispose();
                blobData = null;
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// dispose of the rs instances
        /// </summary>
        void OnDisable()
        {
            if (blobPoints != null)
            {
                VectorPoints.Destroy(ref blobPoints);
            }

            // Clean Up
            if (blobData != null)
            {
                blobData.Dispose();
            }
            if (blobConfiguration != null)
            {
                blobConfiguration.Dispose();
            }

            if (instance != null)
            {
                instance.Close();
                instance.Dispose();
            }
        }
Ejemplo n.º 5
0
        void OnDisable()
        {
            //Disposses all modules

            Initialized = false;
            if (SenseManager == null)
            {
                return;
            }

            DisposeFunctions.ForEach(i => i.DynamicInvoke());

            if (FaceModuleOutput != null)
            {
                FaceModuleOutput.Dispose();
                FaceModuleOutput = null;
            }
            if (HandDataOutput != null)
            {
                SenseManager.PauseHand(true);
                HandDataOutput.Dispose();
                HandDataOutput = null;
            }
            if (BlobDataOutput != null)
            {
                SenseManager.PauseBlob(true);
                BlobDataOutput.Dispose();
                BlobDataOutput = null;
            }
            if (ImageRgbOutput != null)
            {
                ImageRgbOutput.Dispose();
                ImageRgbOutput = null;
            }
            if (ImageDepthOutput != null)
            {
                ImageDepthOutput.Dispose();
                ImageDepthOutput = null;
            }

            if (ImageIROutput != null)
            {
                ImageIROutput.Dispose();
                ImageIROutput = null;
            }

            if (Image3DSegmentationOutput != null)
            {
                Image3DSegmentationOutput.Dispose();
                Image3DSegmentationOutput = null;
            }

            if (Projection != null)
            {
                Projection.Dispose();
                Projection = null;
            }

            /* GZ
             *          if (BlobExtractor != null)
             *          {
             *                  BlobExtractor.Dispose();
             *                  BlobExtractor = null;
             *          } */

            UvMap = null;

            PointCloud = null;

            SenseManager.Dispose();
            SenseManager = null;
        }