WithEvents/Handles better than Remove/AddHandler?

前端 未结 3 2074
轮回少年
轮回少年 2020-12-20 16:35

From a memory point of view (remove an added handler after utilization, etc.), is WithEvents and Handles usage preferable to RemoveHandler

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-20 17:13

    Depends what your doing really, if you want to dynamically attach / detach event handlers then using AddHandler/RemoveHandler is the way to go about it otherwise using Handles is perfectly fine.

提交回复
热议问题