Plot model should only keep a weak reference to the plot control

Oystein Bjorke 6 year бұрын 0
This discussion was imported from CodePlex

tibel wrote at 2014-01-24 08:46:

In the documentation OxyPlot.PlotModel is described as the ViewModel part of the plot.

The model should not keep a strong reference on the view (plot control).
As this would keep the control alive when the containing view of the plot control gets closed.
Using a WeakReference here would do the decoupling.

What do you think?

objo wrote at 2014-01-24 20:51:

Agree on this, and WeakReference would probably be a good solution.
I have added