#define DYNAMIC_INSTANCE(classname) /
public: /
static classname * Instance() /
{ /
static classname obj; /
return &obj; /
} /
private: /
classname(const classname &); /
classname & operator=(const classname &);
Singleton单例模式
最新推荐文章于 2022-07-15 22:32:12 发布