Dispose() public method

Release the native objects.
public Dispose ( ) : void
return void
Exemplo n.º 1
0
        public void Dispose(bool disposing)
        {
            if (disposing)
            {
                // Dispose managed resources
                if (_tabbedThumbnailPreview != null)
                {
                    _tabbedThumbnailPreview.Dispose();
                }
                _tabbedThumbnailPreview = null;

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

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

                // Don't dispose the thumbnail buttons as they might be used in another window.
                // Setting them to null will indicate we don't need use anymore.
                _thumbnailButtons = null;
            }
        }
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                // Dispose managed resources
                if (TabbedThumbnail != null)
                {
                    TabbedThumbnail.Dispose();
                }

                TabbedThumbnail = null;

                WindowsControl = null;
            }

            base.Dispose(disposing);
        }