/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public override void Dispose() { if (_Handle != IntPtr.Zero) { bool res = Egl.DestroySurface(_Display, _Handle); _Handle = IntPtr.Zero; } // Base implementation base.Dispose(); }