Quantcast
Channel: Managed Extensibility Framework
Viewing all articles
Browse latest Browse all 265

New Post: When is a composed NonShared object released for garbage collection

$
0
0
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

Viewing all articles
Browse latest Browse all 265

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>