Aug 1, 2011 at 1:07 PM
Edited Aug 1, 2011 at 1:15 PM
I use the MVVM-Pattern for my Views. In my ViewModel i start a DispatcherTimer in the constructor.
When i navigate to another View via the Prism RegionManager.RequestNavigate-Method i want to remove the DispatcherTimer to avoid memory leaks.
I implement IDisposable. In the Dispose-Method i stop the DispatcherTimer and set it null.
I'm not sure if that is the right way. The Dispose-Method is called then i navigate to another View but when i Navigate back to this View via the RegionManager.RequestNavigate-Method i don't know where i have to instanziate the DispatcherTimer again.