tags:

views:

35

answers:

1

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?

+1  A: 

It depends on a bit on your scenario but the simplest way is to simply attach to the Window::Close event and Dispose of your view model at that time.

JaredPar