I have code that looks like this:
class MyPresenter
{
public MyPresenter(IViewFactory viewFactory, ...)
{
_view = viewFactory.GetMyView();
_view.OkClicked += OnOkClicked;
_view.CancelClicked += OnCancelClicked;
...
}
public ShowView()
{
...
_view.ShowDialog();
}
}
Is it necessary to put a -= somewhere? And if so, does it make sense to put it in the finalizer?