title: WeakReference implementation in .NET
body: <p>I understand and appreciate the usefulness of the <a href="http://msdn.microsoft.com/en-us/library/system.weakreference.aspx" rel="noreferrer">System.WeakReference</a> class in the .NET framework, but am curious as to the implementation details.</p>
  
  <p>How is WeakReference implemented in .NET?  MSDN discusses the usage of WeakReference in detail, but has little details that I've seen on how this works under the hood.  </p>
  
  <p>How does the CLR track the reference and know to null out the internal handle when the Target is collected, without preventing the GC?  Does it require special handling in the CLR itself?  </p>
  
  <p>My main concern would be whether there are performance implications of using WeakReferences (especially if using many of them) that differ from those of using standard object references.</p>