OpenTK.Platform.Windows.WinWindowInfo.Dispose C# (CSharp) Method

Dispose() public method

Releases the unmanaged resources consumed by this instance.
public Dispose ( ) : void
return void
        public void Dispose()
        {
            this.Dispose(true);
            GC.SuppressFinalize(this);
        }

Same methods

WinWindowInfo::Dispose ( bool manual ) : void

Usage Example

Example #1
0
        void Dispose(bool manual)
        {
            if (!disposed)
            {
                if (dc != IntPtr.Zero)
                {
                    if (!API.ReleaseDC(this.handle, this.dc))
                    {
                        Debug.Print("[Warning] Failed to release device context {0}. Windows error: {1}.", this.dc, Marshal.GetLastWin32Error());
                    }
                }

                if (manual && parent != null)
                {
                    parent.Dispose();
                }
                disposed = true;
            }
        }
All Usage Examples Of OpenTK.Platform.Windows.WinWindowInfo::Dispose