The design of this class ensures that only one Singleton object is ever created.
此类的设计确保只创建一个Singleton对象。
We don't really need more than one instance here, so a singleton is fine.
我们实际上并不需要更多的实例,所以单体模式也不错。
One common use is for storing a singleton of a type that is not thread-safe.
一种常见用法是用于存储非线程安全类型的单例。
Singleton: one instance of a class or one value accessible globally in an application.
单例:保证一个类仅有一个实例,并提供一个访问它的全局访问点。
All calls to a singleton object are handled by one instance of that object.
所有对单一物件的呼叫都是由该物件的一个执行个体所处理。
All calls to a singleton object are handled by one instance of that object.
所有对单一物件的呼叫都是由该物件的一个执行个体所处理。
应用推荐