protected override void Dispose(bool disposing) { if (disposing) { if (_pen != null) { _pen.Dispose(); _pen = null; } if (_brush != null) { _brush.Dispose(); _brush = null; } if (_fontFactory != null) { _fontFactory.Dispose(); _fontFactory = null; } } base.Dispose(disposing); }
public void Dispose() { ImagingFactory.Dispose(); Factory2D.Dispose(); FontFactory.Dispose(); SwapChain.Dispose(); Device2D.Dispose(); DeviceContext.Dispose(); }