public void Dispose() { if (!this.disposed) { //ensure only disposed once this.disposed = true; //call virtual disposing method to let sub classes clean up this.Disposing(); //release COM storage object and suppress finalizer ReferenceManager.RemoveItem(this.storage); Marshal.ReleaseComObject(this.storage); GC.SuppressFinalize(this); } }