Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyConfigSingleton : public Singleton
- {
- MyConfigSingleton() { /*get fileName*/ plog::init(fileName/*, ...*/); LOGD << "Created."; }
- ~MyConfigSingleton() { LOGD << "Fail."; }
- void doNothing() const {LOGD << "Doing nothing";}
- };
- int main()
- {
- // init order - MyConfigSingleton::MyConfigSingleton (), Logger::Logger()
- MyConfigSingleton::getInstance()->doNothing();
- // deinit order: Logger::~Logger(), MyConfigSingleton::~MyConfigSingleton()
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement