There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Race condition in usage of WeakReference
In MEFedMVVM.WPF/ViewModelLocator/ViewModelRepoitory.cs, there are a bunch of usages of the IsAlive property of a WeakReference. However, this property should only be used to check if the reference is not alive anymore, since a GC run can occur between
checking the property and using the Target.
The correct usage is to get the value of the Target and checking if it is null. That way, there is a strong reference to the item and it cannot get garbage-collected.