Going loco using my POCOon April 1st, 2012 at 6:04 pm
I never realised until recently, that the binding mechanism can bind to a POCO. Now, don’t get me wrong, I knew that it could read the properties, but I never realised that it listened for updates as well.
Normally I merrily derive from INotifyPropertyChanged (or some suitable base class), call the PropertyChanged event and let the whole thing just work. The same is true of a dependency object.
If the WPF binding mechanism discovers that it’s not one of these objects, it sticks its own listeners onto the object to deal with the changes. Unfortunately, these are never removed, as it doesn’t have a clear understanding of the lifetime of the object. This can cause memory leaks.
You live and learn…