摘要: ★★★原文链接★★★:https://subingwen.cn/design-patterns/singleton/ 饿汉模式: 定义类的时候就创建单例对象; 在多线程下,饿汉模式没有线程安全问题(多线程可以同时访问单例对象); #include <iostream> #include <strin 阅读全文
posted @ 2023-08-16 15:16 我会变强的 阅读(13) 评论(0) 推荐(0) 编辑