Instead, you should do something like this:
var rt = weakRef.Target as ReferencedType;
if (rt != null)
If you manage to get a strong link, you will make sure that the GC will not be built. A more complete example is provided on the MSDN WeakReference page , and if you have not read it yet, you can also find the following:
Weak links
source
share