Singleton pattern is one of the simplest design patterns.
This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object.
This pattern involves a single class which is responsible to create an object while making sure that only single object gets created.
This class provides a way to access its only object which can be accessed directly without need to instantiate the object of the class.
相关文章
- 01-109.7. Pattern Matching
- 01-10标签:ReaderWriterLockSlim vs Double Lock Check pattern
- 01-1022.访问者模式(Vistor Pattern)
- 01-10设计模式-11享元模式(Flyweight Pattern)
- 01-10设计模式のCommand Pattern(命令模式)----行为模式
- 01-10设计模式系列之装饰模式(Decorator Pattern)
- 01-10leetcode面试准备: Word Pattern
- 01-10设计模式3 - 单例模式【Singleton Pattern】
- 01-10.NET设计模式-单件模式(Singleton Pattern)
- 01-10设计模式系列之装饰模式(Decorator Pattern)——扩展系统功能