/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public virtual void Dispose() { if (_Display != IntPtr.Zero) { Egl.Terminate(_Display); _Display = IntPtr.Zero; } }
/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting managed/unmanaged resources. /// </summary> /// <param name="disposing"> /// A <see cref="System.Boolean"/> indicating whether the disposition is requested explictly. /// </param> protected override void Dispose(bool disposing) { if (disposing) { //if (_EglSurface != IntPtr.Zero) { // Egl.DestroySurface(_Display, _EglSurface); // _EglSurface = IntPtr.Zero; //} if (_Display != IntPtr.Zero) { Egl.Terminate(_Display); _Display = IntPtr.Zero; } } }