AddHandler and RemoveHandler

  • Thread starter Thread starter Elisa
  • Start date Start date
E

Elisa

Hi,

If you add event handlers using AddHandler, do you have to explicitly
call RemoveHandler, or are event handlers automatically removed when the
listener goes "out of focus" (read: gets disposed)?


Regards,

Elisa
 
You should be ok not removing event handlers explicitly. The real reason to
do this would be for handlers not to run into ObjectDisposedException when
trying to retrieve some data from the form being destroyed
 
Back
Top