Beispiel #1
0
 private void DisposeImpl(bool disposing)
 {
     if (this.handle != IntPtr.Zero)
     {
         if (disposing)
         {
             allPanels.Remove(this.handle);
         }
         CursesMethods.del_panel(this.handle);
         this.handle = IntPtr.Zero;
         this.window = null;
     }
 }
Beispiel #2
0
 /// <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
         if (this.window != null)
         {
             this.window.Dispose();
             this.window = null;
         }
     }
     // free native resources if there are any.
     if (this.handle != IntPtr.Zero)
     {
         if (disposing)
         {
             allPanels.Remove(this.handle);
         }
         CursesMethods.del_panel(this.handle);
         this.handle = IntPtr.Zero;
     }
 }