Browse Source

Manual GC collection

Vsevolod Levitan 4 tháng trước cách đây
mục cha
commit
f4acd86493
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      Program.cs

+ 2 - 0
Program.cs

@@ -59,6 +59,8 @@ internal class Program
         Console.WriteLine(board);
 
         Console.Write("Your move: ");
+        GC.Collect(2, GCCollectionMode.Aggressive);
+        GC.WaitForFullGCComplete();
         board.PlaceCoin(Player.Human, int.Parse(Console.ReadLine()!) - 1);
 
         if (board.GetWinner() == Player.Human)