コード例 #1
0
ファイル: Emulation.cs プロジェクト: krytarowski/emul8
 public void Dispose()
 {
     FileFetcher.CancelDownload();
     lock (machLock)
     {
         var toDispose = machs.Rights.ToArray();
         //Although a single machine does not have to be paused before its disposal,
         //disposing multiple entities has to ensure that all are stopped.
         ExternalsManager.Pause();
         Array.ForEach(toDispose, x => x.Pause());
         Array.ForEach(toDispose, x => x.Dispose());
         machs.Clear();
         ExternalsManager.Clear();
         HostMachine.Dispose();
         CurrentLogger.Dispose();
     }
 }