public void Dispose() { if (FontFace != null) { FontFace.Dispose(); FontFace = null; } }
private void Dispose(bool disposing) { if (_isDisposed) { return; } _isDisposed = true; if (!disposing) { return; } Font?.Dispose(); Face?.Dispose(); FontFace?.Dispose(); }
private bool disposedValue = false; // To detect redundant calls protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { if (this.FontFace != null && !FontFace.IsDisposed) { try { FontFace.Dispose(); } catch { } } } // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below. // TODO: set large fields to null. disposedValue = true; } }
public void Dispose() { FontFace.Dispose(); FontFace = null; }
public void Dispose() { fontFace_.Dispose(); }
internal void SetFont(string filename) { FontFace?.Dispose(); FontFace = new Face(lib, filename); SetSize(this.Size); }