소스 검색

Manual GC collection

Vsevolod Levitan 4 달 전
부모
커밋
f4acd86493
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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)