关于单例设计模式&时间:2019-03-17 标签:c#
Possible Duplicate:
On Design Patterns: When to use the Singleton?
in what kind of situation Singleton pattern will be used. please explain with real life scenario. thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在一个具有动态生成的菜单的网站中使用了它,该菜单由一组用户共享。
我们在内存中生成菜单,因为如果每次生成菜单时都从数据库中读取,我们会降低性能。
I used it in a website that had a dynamically generated menu, that were shared by a group of users.
We generated the menu in memory, since we would loose performance if was read from the database every time it should be generated.