protected virtual void Dispose(bool disposing) { if (DC != null && !_nativeHandle.IsNull) { DC.DeleteObject(_nativeHandle, GdiObjectType.Brush); _nativeHandle = default; } if (disposing) { GC.SuppressFinalize(this); } }
protected virtual void Dispose(bool disposing) { if (DC != null && _nativeHandle != IntPtr.Zero) { DC.DeleteObject(_nativeHandle, GdiObjectType.Brush); _nativeHandle = IntPtr.Zero; } if (disposing) { GC.SuppressFinalize(this); } }
protected virtual void Dispose(bool disposing) { if (dc != null && nativeHandle != IntPtr.Zero) { DbgUtil.AssertFinalization(this, disposing); dc.DeleteObject(nativeHandle, GdiObjectType.Brush); nativeHandle = IntPtr.Zero; } if (disposing) { GC.SuppressFinalize(this); } }
void Dispose(bool disposing) { if (_nativeHandle != IntPtr.Zero && _dc != null) { _dc.DeleteObject(_nativeHandle, GdiObjectType.Pen); _nativeHandle = IntPtr.Zero; } if (_wndBrush != null) { _wndBrush.Dispose(); _wndBrush = null; } if (disposing) { GC.SuppressFinalize(this); } }
void Dispose(bool disposing) { if (!_nativeHandle.IsNull && _dc != null) { _dc.DeleteObject(_nativeHandle, GdiObjectType.Pen); _nativeHandle = default; } if (_wndBrush != null) { _wndBrush.Dispose(); _wndBrush = null; } if (disposing) { GC.SuppressFinalize(this); } }
void Dispose(bool disposing) { if (nativeHandle != IntPtr.Zero && dc != null) { DbgUtil.AssertFinalization(this, disposing); dc.DeleteObject(nativeHandle, GdiObjectType.Pen); nativeHandle = IntPtr.Zero; } if (wndBrush != null) { wndBrush.Dispose(); wndBrush = null; } if (disposing) { GC.SuppressFinalize(this); } }