Hi,
Based on my understanding, the approach you took to solve the problem is the correct one. You need to unsubscribe when you navigate since the KeepAlive = false will only mark your ViewModel for garbage collection, but you can't control when the garbage collection occurs. For that reason, until the Garbage Collector runs, those old instances of your ViewModels will remain in memory, and that's the reason why they continue responding to events. Take into account that the Garbage Collector will remove these ViewModels as long as there are no strong references to them.
Regarding your nested regions question, in order for you to remove a view and all nested regions/views contained in it afterwards, the following attached property must be defined in your view XAML like in the following code snippet:
You can find more information about this topic in the Prism 4.1 Readme.
Hope this helps,
Federico Martinez
http://blogs.southworks.net/fmartinez
Based on my understanding, the approach you took to solve the problem is the correct one. You need to unsubscribe when you navigate since the KeepAlive = false will only mark your ViewModel for garbage collection, but you can't control when the garbage collection occurs. For that reason, until the Garbage Collector runs, those old instances of your ViewModels will remain in memory, and that's the reason why they continue responding to events. Take into account that the Garbage Collector will remove these ViewModels as long as there are no strong references to them.
Regarding your nested regions question, in order for you to remove a view and all nested regions/views contained in it afterwards, the following attached property must be defined in your view XAML like in the following code snippet:
(...) xmlns:Regions="http://www.codeplex.com/prism" RegionBehaviors:ClearChildViewsRegionBehavior.ClearChildViews="True">
Hope this helps,
Federico Martinez
http://blogs.southworks.net/fmartinez