My ViewModel implements IDisposable, but it looks like the the View (System.Windows.Window) does not. So how do I ensure that the VM gets disposed in a timely fashion?
My ViewModel implements IDisposable, but it looks like the the View (System.Windows.Window) does not.
Share
It depends on a bit on your scenario but the simplest way is to simply attach to the
Window::Closeevent and Dispose of your view model at that time.