When is a composed NonShared object released for garbage collection

Feb 11, 2014 at 5:49 PM
Edited Feb 11, 2014 at 5:50 PM
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