D
David Rogers
When I, let's say I'm a form, register myself for an event, I use a syntax
such as:
Class1.EventName += new EventNameHandler(MyFormsEventHandler);
Somewhere in global scope, I have defined the delegate EventNameHandler:
public delegate void EventNameHandler(object source, Eventargs e);
In Class1 I have:
public static event EventNameHandler EventName;
I assume that the event EventName keeps track of all of the EventNameHandler
delegates that are register with it. But who unregisters the delegate when
my form is destroyed? Can someone please explain?
Regards,
David Rogers
such as:
Class1.EventName += new EventNameHandler(MyFormsEventHandler);
Somewhere in global scope, I have defined the delegate EventNameHandler:
public delegate void EventNameHandler(object source, Eventargs e);
In Class1 I have:
public static event EventNameHandler EventName;
I assume that the event EventName keeps track of all of the EventNameHandler
delegates that are register with it. But who unregisters the delegate when
my form is destroyed? Can someone please explain?
Regards,
David Rogers