private void DisposeImpl() { if (this.winptr != IntPtr.Zero && this.ownsPtr) { CursesMethods.delwin(this.winptr); this.winptr = IntPtr.Zero; } }
/// <summary> /// The bulk of the clean-up code is implemented in Dispose(bool) /// </summary> /// <param name="disposing"></param> protected virtual void Dispose(bool disposing) { if (disposing) { // free managed resources } // free native resources if there are any. if (this.winptr != IntPtr.Zero) { CursesMethods.delwin(winptr); winptr = IntPtr.Zero; } }