コード例 #1
0
ファイル: Panel.cs プロジェクト: WildGenie/curses-sharp-code
 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;
     }
 }
コード例 #2
0
ファイル: Panel.cs プロジェクト: jTitor/CursesSharp
 /// <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;
     }
 }