purpoae of weak reference c# code example
Example: c# week refrences
WeakReference foo = new WeakReference(new Foo());
((Foo)brokerRef.Target).Bar();
((Foo)brokerRef.Target).Baz();
GC.Collect();
GC.WaitForPendingFinalizers();
Assert.IsFalse(foo.IsAlive);