It is for you! If your application can notify ViewModel when it is no longer required, you must unsubscribe.
For example, in our project we have IViewDisposeService. If a view (or its model) needs deterministic finalization, it is registered in the IViewDisposeService when displayed. Core then uses the same service to notify recorded views when they have been removed from the regions.
Another way is to use commands. Your model sets the command that should be called by the view when it is closed. ViewModel can use a command handler to unsubscribe.
By the way, if you are worried that the EventAggregator will save your ViewModel, this is not a problem because the Prism EventAggregator uses weak links.
source share