Hiya,
I'm trying to maintain a list of objects in a Manager class in C#. Basically a consumer class registers with the Manager class and the manager class maintains a collection of references to the consumer class. Now as far as my (limited) understanding of GC goes, keeping a reference to the consumer class will prevent the consumer class being garbage collected.
What I am after is a way of maintaining a reference to the class in the manager class that might or might not point to the consumer class (in a determinable way) depending on whether it has been garbage collected. How does one do this in c#?