/// <summary>Free the resource.</summary> public void Unload() { if (_display != IntPtr.Zero && _fontResourceId != (X11.XID) 0) { if (!_useFontset && _fontResourceId != (X11.XID) 0) { X11lib.XUnloadFont(_display, _fontResourceId); } else if (_useFontset && _fontResourceId != (X11.XID) 0) { X11lib.XFreeFontSet(_display, _fontResourceId); } _display = IntPtr.Zero; _fontResourceId = (X11.XID) 0; } }