jcyuan
1
it seems that my singleton class destructor not called automatically when app close.
and i found that i need to call myclass::getInstance()->deleteInstance() manually.
so i wanna know that is this the normal way to destroy a singleton class?
for now i destory them in the App::shutdown() method.
am i right?
thank you.
jules
2
You could use DeletedAtShutdown. (But better still: don't use singletons!)
jcyuan
3
thank you, i'll try that.
so what is the reason that dont' use singletons?
i think one or two in the app should be acceptable right?
jules
4
Yeah, one or two won't do much harm. It's worth avoiding them where possible though.