Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: AvalonDock ViewModels remain in memory after being removed from DocumentsSource

$
0
0
Hi,

I am using the Diagnostic tools in Visual Studio. I have a command linked to a button which I use to do GC.Collect() before I take the memory snapshot. Basically I will add one viewmodel, then remove it. I then add 5 copies of the same viewmodel, take a memory snapshot, remove the five copies, run GC.Collect() and then take another snapshot.

I have been working on this today and I discovered that if I call GC.Collect() twice (not sure why I tried this, but I did) then the viewmodels are removed. I don't profess to be an expert on GC but I didn't expect calling GC.Collect() twice to make any difference, but it does make me slightly less concerned if that makes any sense!

Note that I have updated the sample since first posting.

Thanks

Viewing all articles
Browse latest Browse all 4964

Trending Articles



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