Calling SuppressFinalize multiple times
问题 Is there any downside of calling GC.SuppressFinalize(object) multiple times? Protected Dispose(bool) method of the dispose pattern checks whether it is called before but there is no such check in the public Dispose() method. public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected virtual void Dispose(bool disposing) { if (_Disposed) return; if (disposing) { // Cleanup managed resources. } // Cleanup unmanaged resources. _Disposed = true; } ~MyClass() { Dispose(false); }