/// <summary> /// Implementation of the <see cref="IDisposable"/> pattern /// </summary> /// <param name="disposing">True if this object is being disposed, false if it is being finalized</param> private void Dispose(bool disposing) { if (disposing) { if (_vtkWin32OpenGLRW != null) { _vtkWin32OpenGLRW.Dispose(); _vtkWin32OpenGLRW = null; } } }
protected virtual void Dispose(bool disposing) { if (disposing) { if (_dynamicRenderEventPublisher != null) { _dynamicRenderEventPublisher.Cancel(); _dynamicRenderEventPublisher.Dispose(); _dynamicRenderEventPublisher = null; } if (_vtkRenderWindow != null) { _vtkRenderWindow.Dispose(); _vtkRenderWindow = null; } if (_vtkRenderer != null) { _vtkRenderer.Dispose(); _vtkRenderer = null; } if (_sceneGraphRoot != null) { _sceneGraphRoot.Dispose(); _sceneGraphRoot = null; } if (_imageBuffer != null) { _imageBuffer.Dispose(); _imageBuffer = null; } if (_overlayBuffer != null) { _overlayBuffer.Dispose(); _overlayBuffer = null; } if (_finalBuffer != null) { _finalBuffer.Dispose(); _finalBuffer = null; } } }