template<typename T>
class Ogre::Singleton< T >
Template class for creating single-instance global classes.
This implementation [1] slightly derives from the textbook pattern, by requiring manual instantiation, instead of implicitly doing it in getSingleton. This is useful for classes that want to do some involved initialization, which should be done at a well defined time-point or need some additional parameters in their constructor.
It also allows you to manage the singleton lifetime through RAII.
- Note
- Be aware that getSingleton will fail before the global instance is created. (check via getSingletonPtr)