Skip to content

Commit

Permalink
Update W5 D2
Browse files Browse the repository at this point in the history
  • Loading branch information
cvpfus committed Oct 3, 2023
1 parent 77ade8a commit b7d65f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion FormulatrixBootcamp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QueueStack", "W3 D3\QueueSt
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "W5 D1", "W5 D1", "{2A99B32E-4EA2-467B-A477-CB0844233CDC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GarbageCollection", "GarbageCollection\GarbageCollection.csproj", "{2739F473-20E7-4786-AC1F-2479A2E18A83}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GarbageCollection", "W5 D1\GarbageCollection\GarbageCollection.csproj", "{2739F473-20E7-4786-AC1F-2479A2E18A83}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
8 changes: 5 additions & 3 deletions W5 D1/GarbageCollection/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ static void Main()
Console.WriteLine("The highest generation is {0}", GC.MaxGeneration);
Console.WriteLine("Generation: {0}", GC.GetGeneration(garbage));
garbage.CreateGarbage(1000);

//Console.Read();

GC.Collect(0);
Console.WriteLine("Generation: {0}", GC.GetGeneration(garbage));

//Console.Read();

GC.Collect(1);
Console.WriteLine("Generation: {0}", GC.GetGeneration(garbage));

//Console.Read();

}
}

0 comments on commit b7d65f6

Please sign in to comment.