Exemplo n.º 1
0
 public void Dispose()
 {
     parent.Boards.Remove(this);
     boardItems.Clear();
     selected.Clear();
     layers.Clear();
     GC.Collect();
     GC.WaitForPendingFinalizers();
 }
Exemplo n.º 2
0
 public void Dispose()
 {
     lock (parent)
     {
         parent.Boards.Remove(this);
         boardItems.Clear();
         selected.Clear();
         mapLayers.Clear();
     }
     // This must be called when MultiBoard is unlocked, to prevent BackupManager deadlocking
     parent.OnBoardRemoved(this);
     GC.Collect();
     GC.WaitForPendingFinalizers();
 }