Example #1
0
 public WeakKeyReference(T key, WeakKeyComparer <T> comparer)
     : base(key)
 {
     // retain the object's hash code immediately so that even
     // if the target is GC'ed we will be able to find and
     // remove the dead weak reference.
     this.HashCode = comparer.GetHashCode(key);
 }