protected virtual void Dispose(bool disposing)
        {
            if (!disposed)
            {
                if (depthFloatBuffer != null)
                {
                    depthFloatBuffer.Dispose();
                    depthFloatBuffer = null;
                }

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

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

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

                disposed = true;
            }
        }
Exemple #2
0
        public void Dispose()
        {
            if (!isDisposed)
            {
                syncProcessing.Enter();

                isDisposed = true;

                reader?.Dispose();

                floatDepthFrame?.Dispose();
                pointCloudFrame?.Dispose();
                surfaceFrame?.Dispose();

                reconstruction?.Dispose();
            }
        }