Ver código fonte

Manual GC collection

Vsevolod Levitan 4 meses atrás
pai
commit
f4acd86493
1 arquivos alterados com 2 adições e 0 exclusões
  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)