Skip to content

Instantly share code, notes, and snippets.

@dsibinski
Created August 20, 2018 18:30
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/894cc10e61c3d6eca437e5690353b010 to your computer and use it in GitHub Desktop.
Save dsibinski/894cc10e61c3d6eca437e5690353b010 to your computer and use it in GitHub Desktop.
void Mark(objectRef o)
{
if (!InUseList.Exists(o))
{
InUseList.Add(o);
List refs = GetAllChildReferences(o);
foreach (objectRef childRef in refs)
{
Mark(childRef);
}
}
}
// 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