/// <summary> /// Implements the .NET Dispose pattern. /// </summary> protected void Dispose(bool disposing) { if (disposing) { handle.Dispose(); handle.SetHandleAsInvalid(); } }
/// <summary> /// Implements the .NET Dispose pattern. /// </summary> protected virtual void Dispose(bool disposing) { if (disposing && handle != null && !handle.IsInvalid) { handle.Dispose(); handle.SetHandleAsInvalid(); } }
/// <summary> /// Implements the .NET Dispose pattern. /// </summary> protected virtual void Dispose(bool disposing) { if (disposing) { handle.Dispose(); handle.SetHandleAsInvalid(); boxedModule?.Dispose(); } }