Do I have a memory leak here?
The lambda assigned to VM2.WhenP1Changes
captures this
VM1 instance (needed to access the VM3
property), so as long as the view model VM2
is alive, it will keep VM1
alive. Whether this ends up being a leak depends on the lifecycle of those view models, but the implications are effectively the same as your first example using events.