i recently created a sample application, wherein i implemented the events and delegates, when the Properties value is changed this event will raise, i have a question regarding events
-
Does event objects are created in memory? or they are just static object which gets removed once the event is fired?
-
Is it necessary to remove the handler once the event is executed, to free-up resources. does removing handler once done, boost’s up the application performance, i am talking about the application which are using lots of events
Events do take memory and are not garbage collected until after you unsubscribe from them. They are a common cause of memory leaks.