/// <summary> /// Releases the unmanaged resources used by the <see cref="T:System.Windows.Forms.Control"/> and its child controls and optionally releases the managed resources. /// </summary> /// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param> protected override void Dispose(bool disposing) { if (!_disposed && disposing) { if (_shadeBorder != null) { _shadeBorder.Dispose(); _shadeBorder = null; } if (_toolTip != null) { _toolTip.Dispose(); _toolTip = null; } foreach (var pageCache in _pageCache) { if (pageCache.Image != null) { pageCache.Image.Dispose(); pageCache.Image = null; } } _disposed = true; } base.Dispose(disposing); }
/// <summary> /// Releases the unmanaged resources used by the <see cref="T:System.Windows.Forms.Control"/> and its child controls and optionally releases the managed resources. /// </summary> /// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param> protected override void Dispose(bool disposing) { if (!_disposed && disposing) { if (_shadeBorder != null) { _shadeBorder.Dispose(); _shadeBorder = null; } if (_toolTip != null) { _toolTip.Dispose(); _toolTip = null; } _disposed = true; } base.Dispose(disposing); }