什么是单身人士模式? [英] what is singleton pattern?

查看:83
本文介绍了什么是单身人士模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是单身人士模式?有什么用?有例子请回复我这个问题的答案

what is singleton pattern? and what is the use? with example please reply me this question answer

推荐答案

通过这个链接

http://www.dotnet-tricks.com/Tutorial/designpatterns/L2KL080613-Singleton-Design-Pattern---C [ ^ ]

http: //stackoverflow.com/questions/733842/what-are-the-real-world-applications-of-singleton-pattern [ ^ ]

希望这有助于
Go through this links
http://www.dotnet-tricks.com/Tutorial/designpatterns/L2KL080613-Singleton-Design-Pattern---C[^]
http://stackoverflow.com/questions/733842/what-are-the-real-world-applications-of-singleton-pattern[^]
hope this helps


请参阅:

http:// e n.wikipedia.org/wiki/Singleton_pattern [ ^ ]。



请注意,当真正需要时,单身人士很少是用户。例如,请参阅: http://www-106.ibm.com/developerworks/library/co -single.html [ ^ ]。



有很多糟糕的单例实现。你可以在这里找到好的: http://csharpindepth.com/Articles/General/Singleton.aspx [< a href =http://csharpindepth.com/Articles/General/Singleton.aspxtarget =_ blanktitle =New Window> ^ ]。



-SA
Please see:
http://en.wikipedia.org/wiki/Singleton_pattern[^].

Note that singletons should be user rarely, when it is really needed. See, for example: http://www-106.ibm.com/developerworks/library/co-single.html[^].

There are many bad singleton implementations around. You can find good ones here: http://csharpindepth.com/Articles/General/Singleton.aspx[^].

—SA


单身人士应该避免。



http://www.richardlord.net/blog/better-without-singletons [ ^ ]
Singletons are something to be avoided.

http://www.richardlord.net/blog/better-without-singletons[^]


这篇关于什么是单身人士模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆