To facilitate this, the plug-in class implements the singleton pattern: It stores a reference to itself in a private class variable.
为了使这一点更方便,插件类实现单模式(singleton pattern):它在私有类变量中存储一个自身的引用。
Unless the Settings wrapper class is designed using the singleton pattern, there can be multiple instances of the same application Settings class in a single application.
除非使用单一实例模式来设计设置包装类,否则单个应用程序中可能存在同一个应用程序设置类的多个实例。
The Singleton pattern is shown in Figure 5.
Singleton模式如图5所示。
应用推荐