Event Broker - Weak Delegates?

Topics: CAB & Smart Client Software Factory
Jul 3, 2005 at 1:02 PM
originally posted by: Cubes

What kind of delegates does the event broker us to listen to events? The question is really about weak references in C#, there has been some dicussion about why the framework team didn't implement events / as weak delegates to that if an object is listening to one of your events you cannot be garbage collected because another object has a reference to you.


The broker seems like a nice way of handling this, he could keep a list of weak delegate references to the objects that are publishing events.
Jul 3, 2005 at 6:02 PM
originally posted by: EdJez

Check PublisherInfo.cs - is that what you'd like to see?
Jul 11, 2005 at 6:58 PM
originally posted by: Cubes

Sweet... you got it right!
Jul 11, 2005 at 7:20 PM
originally posted by: EdJez