public void UnRegister(BaseModelObject model) { lock (_allData) { _allData.RemoveAll(wr => ReferenceEquals(wr.Target, model)); } }
public void Register(BaseModelObject model) { lock (_allData) { _allData.Add(new WeakReference(model)); } }