/// <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> protected virtual void Dispose(bool disposing) { if (disposing) { ParentDesktopObject = null; if (_toolSet != null) { _toolSet.Dispose(); _toolSet = null; } StopLoadingPriors(); StopPrefetching(); if (_physicalWorkspace != null) { _physicalWorkspace.Dispose(); _physicalWorkspace = null; } if (_logicalWorkspace != null) { _logicalWorkspace.Dispose(); _logicalWorkspace = null; } if (_studyTree != null) { _studyTree.Dispose(); _studyTree = null; } if (_layoutManager != null) { _layoutManager.Dispose(); _layoutManager = null; } if (ExtensionData != null) { ExtensionData.Dispose(); ExtensionData = null; } } }
public void Dispose() { if (_item != null && _item is IDisposable) { ((IDisposable)_item).Dispose(); _item = null; } if (_image != null) { _image.Dispose(); _image = null; } if (_extensionData != null) { _extensionData.Dispose(); _extensionData = null; } }
/// <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> protected virtual void Dispose(bool disposing) { if (disposing) { if (ParentImageSet != null) { ((ImageSet)ParentImageSet).RemoveCopy(this); } DisposePresentationImages(); if (_extensionData != null) { _extensionData.Dispose(); _extensionData = null; } } }
/// <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> protected virtual void Dispose(bool disposing) { if (disposing) { DisposeTiles(); _tiles = null; if (_displaySet != null) { _displaySet.PresentationImages.ItemAdded -= PresentationImageAdd; _displaySet.PresentationImages.ItemRemoved -= PresentationImageRemove; } if (ExtensionData != null) { ExtensionData.Dispose(); ExtensionData = null; } } }
/// <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> protected virtual void Dispose(bool disposing) { if (disposing) { if (_renderer != null) { _renderer.Dispose(); _renderer = null; } if (_sceneGraph != null) { _sceneGraph.Dispose(); _sceneGraph = null; } if (_extensionData != null) { _extensionData.Dispose(); _extensionData = null; } } }