title: C# Garbage collection
body: <p>Say we have:</p>
  
  <pre><code>public void foo()
  {
     someRefType test = new someRefType ();
     test = new someRefType ();
  }
  </code></pre>
  
  <p>What does the garbage collector do with the first heap object? Is it immediately garbage collected before the new assignment? What is the general mechanism?</p>