Skip to content

Instantly share code, notes, and snippets.

@dsibinski
Created August 20, 2018 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsibinski/7902dcca5400b36b0751ca69ed8124e5 to your computer and use it in GitHub Desktop.
Save dsibinski/7902dcca5400b36b0751ca69ed8124e5 to your computer and use it in GitHub Desktop.
void Collect()
{
List gcRoots = GetAllGCRoots();
foreach (objectRef root in gcRoots)
{
Mark(root);
}
Cleanup();
}
// source: Under the Hood of .NET Memory Management
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment