I wanted to know what is the lifetime of a composed NonShared object?
For example if I created an object(which is a ViewModel) using an ExportFactory<object,Metadata> (the Metadata being used to resolve what kind of VM needs to be created) and the only reference to the ViewModel is the DataContext of the View. What should happen to the ViewModel when the View is destroyed?
In my particular case the ViewModel stays in memory until the application is terminated.
p.s : I see that the ViewModel is held in a Hashset<IDisposables> by the CatalogExportProvider
For example if I created an object(which is a ViewModel) using an ExportFactory<object,Metadata> (the Metadata being used to resolve what kind of VM needs to be created) and the only reference to the ViewModel is the DataContext of the View. What should happen to the ViewModel when the View is destroyed?
In my particular case the ViewModel stays in memory until the application is terminated.
p.s : I see that the ViewModel is held in a Hashset<IDisposables> by the CatalogExportProvider