Ensure a class only has one instance, and provide a global point of access to it.
确保某个类只有一个实例,并为该实例提供全局访问点。
NonDerivableSingleton
BaseSingleton
DerivedSingleton
instance
GetInstance()