The Singleton pattern is shown in Figure 5.
Singleton模式如图5所示。
Returns the singleton application instance.
返回应用程序单例对象。
Are you sure you need the singleton interface?
你确定你需要单独的接口?
It is actually the real name of the singleton instance of the Unit type!
事实上这是Unit类型单体实例的真正名字!
Through this functionality, you can use the popular singleton pattern.
通过使用这种功能,您可以使用流行的单例模式。
For example, take a look at the connection pool singleton in Listing 1.
例如,看一下清单1内所示的这个连接池单例。
The API is straightforward: You call a singleton method and get back a connection object.
API很直观:您调用单个方法,并返回一个连接对象。
The Manager object is a singleton and is needed to create all other objects.
Manager是一个单实例对象,需要它来创建所有其他对象。
Singleton — returns reference to the single instance of the delegate object.
Singleton——返回对委托对象单个实例的引用。
Singleton is the default and most often used object mode.
Singleton是默认的也是最常用的对象模型。
The design of this class ensures that only one Singleton object is ever created.
此类的设计确保只创建一个Singleton对象。
Finally, the application of singleton pattern is depicted in this system.
最后,描述了单体模式在系统中的应用。
So with this class we can makeany class singleton, without duplicating the code.
使用这个类,不需要复制代码就可以实现任意类单例化。
The basic thing comes in my mind is either Singleton or Factory Pattern.
基本的事情出现在我的脑海里是单件或工厂模式。
The basic thing comes in my mind is either Singleton or Factory Pattern.
基本的事情出现在我的脑海里是单件或工厂模式。
应用推荐