protected virtual void Dispose(bool disposing) { if (!_disposed) { #if DEBUG --_instanceCount; #endif if (disposing) { if (_pidl != null) { _pidl.Dispose(); _pidl = null; } if (_rootItem != null) { // do not dispose this - we don't own it! _rootItem = null; } } if (_shellFolder != null) { // release the IShellFolder interface of this shell item Marshal.ReleaseComObject(_shellFolder); _shellFolder = null; } _disposed = true; } }
protected virtual void Dispose(bool disposing) { if (!_disposed) { #if DEBUG --_instanceCount; #endif if (disposing) { if (_pidl != null) { _pidl.Dispose(); _pidl = null; } if (_rootItem != null) { // do not dispose this - we don't own it! _rootItem = null; } } if (_shellFolder != null) { // release the IShellFolder interface of this shell item Marshal.ReleaseComObject(_shellFolder); _shellFolder = null; } _disposed = true; } }