【发布时间】:2011-11-26 20:18:27
【问题描述】:
我想知道在新的 MVVM-Light V4 的 ViewModelLocator 中清理资源的最佳方法是什么。据我所知,在版本 3 之前,方法 ViewModelLocator.Cleanup() 调用了其余视图模型的 Cleanup() 方法。
在版本 4 中,新的 ViewModel 模板不包含 Cleanup() 方法,也不会在添加到 ViewModelLocator 时生成它们。正如我在其他与 V3 相关的类似问题中看到的,V4 计划集中清洁资源,那么如何实现呢?
谢谢。
艾迪
【问题讨论】:
标签: .net windows-phone-7 mvvm-light resource-cleanup