1
臭虫

Singletons vs Static Classes : LeeDumond.com

xgluxvxgluxv 发表于 316 天, 12 小时, 57 分钟 之前
Wednesday, May 06, 2009 3:32:09 AM GMT Thursday, April 30, 2009 1:40:02 AM GMT

My last "versus" post seemed to elicit a good number of interesting responses. Today, I'm musing about Singletons vs. Static Classes -- two constructs which appear to accomplish the same task. Or do they? The singleton pattern, as applied to a class, is a design pattern that is used to restrict instantiation of that class to a single instance. A singleton is responsible for creating and maintaining its unique instance, and must define a public member that grants clients a global point of access to the u...

类别: Language | 点击: 0 | | 源: leedumond.com | show counter code
标签: Singleton, Static Classes

没有任何评论, 这将是第一个发表评论.

要发表评论请 登录 或者 注册