58template <
class T> T* Singleton<T>::instance =
nullptr;
Inherit from this class to create a singleton that will be destroyed when your games exits.
static T * handleIfAlive() noexcept
Doesn't create the Singleton, may return nullptr.
static void destroy() noexcept
Deletes the Singleton.
static T & handle()
Creates the Singleton if needed.
void atExit(std::function< void()>)
Call this function once when the window is hidden.
Functions related to the main window.