Dependency Property是否实现了Flyweight模式?(Does Dependency Property implement Flyweight Pattern?)
WPF中的依赖属性系统应用Flyweight模式来节省内存存储吗?
Is the dependency property system in WPF the Flyweight Pattern applied to save memory storage?
最满意答案
我相信你可以把它视为flyweight模式的实现。
默认值在相同类型的所有控件之间共享。 只有那些偏离默认值的属性才会占用额外的内存。
其他信息可以在Christian Mosers博客上找到,或者在msdn的价值优先页面上找到。
I believe you could consider it as an implementation of the flyweight pattern yes.
Default values are shared across all controls of the same type. Only those properties that deviate from the default values take up extra memory.
Additional information can be found on Christian Mosers blog, or msdn's page on value precedence.
更多推荐
发布评论