Skip to content

Commit

Permalink
GC feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
sdmaclea committed Aug 30, 2019
1 parent 5f05389 commit 9956248
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ public ActionResult<string> memspike(int seconds)
// Cleanup
p = null;

// Call GC.Collect twice
// GC
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();

Thread.Sleep(5000); // Sleep for 5 seconds before spiking memory again
Expand Down

0 comments on commit 9956248

Please sign in to comment.