title: C# Garbage Collection Active Roots
body: <p>I'm reading about the C# garbage collector, and how the CLR builds object graphs.
  The chapter references different roots that could be active for the object:</p>
  
  <blockquote>
    <p>•  References to global objects (though these are not allowed in C#, CIL
    code does  permit allocation of global objects)<br>
    •  References to any
    static objects/static fields<br>
    •  References to local objects within an
    application’s code base<br>
    •  References to object parameters passed
    into a method<br>
    •  References to objects waiting to be finalized
    (described later in this chapter)<br>
    •  Any CPU register that references
    an object</p>
  </blockquote>
  
  <p>I was wondering if someone could give examples of these roots in code?</p>
  
  <p>Thanks</p>