Benefits:
• The remote proxy can shield the fact that the implementation resides in another address space.
• The virtual proxy can perform optimizations—for example, by creating objects on demand.
Applicable Scenario:
• The Proxy pattern is appropriate when a more versatile or sophisticated reference to an object, rather than a simple pointer, is needed.
博客介绍了代理模式的好处,远程代理可屏蔽实现位于不同地址空间的事实,虚拟代理能按需创建对象进行优化。还指出适用场景,当需要对对象进行更通用或复杂的引用而非简单指针时,适合使用代理模式。
7万+

被折叠的 条评论
为什么被折叠?



