CalculatedProperties
CalculatedProperties copied to clipboard
Memory leak: long living source property and short living target property
Short living dependency can't be garbage collected when depends on long living source, much like in classic events. Created a pull request with a test and suggested fix.
I'll have to look this over pretty closely. In my experience, code that introduces a WeakReference fix often ends up exchanging one bug for another.
Do you think it's worth to implement IDisposable instead?
- CalculatedProperty can remove itself from every source's _targets list
- PropertyHelper disposes all properties that implement IDisposable
Also, is this project superseded by https://github.com/StephenCleary/Mvvm.CalculatedProperties ?