C++单例模式

单例模式:只能创建出一个对象的类

1、饿汉单例模式

2、懒汉单例模式

 

posted @ 2018-08-08 20:27  Amlet  阅读(110)  评论(0编辑  收藏  举报