知识星球
笔记
榜单
on
2026-09-12 11:51
单例模式都构造函数是 private,只有 instance 能被调用,懒汉模式允许第一次使用时才创建,因为使用 instance 判断 static 指针是否是 nullptr 的
展开全部