C# How to unsubscribe all event handlers from a given event?
- by Adi Barda
Hi Guys,
Is there a simple way to iterate all over the handlers subscribed to a given event? my problem is that clients subscribe but forget to unsubscribe so a memory leak happens. I need a way for an object to disconnect all the handlers of its events in the Dispose method so a leak would not happen - at least not because of events.
Hope my question was clear
thank you,
Adi Barda