Add a hasInstance to ResourceManager

This is needed to allow order-independent shutdown, due to the dumb
ownership behaviour for providers.
This commit is contained in:
Automatic Release Builder 2020-10-06 11:34:03 +01:00
parent e39036a635
commit f95cbd703a
2 changed files with 7 additions and 0 deletions

View File

@ -49,6 +49,11 @@ ResourceManager* ResourceManager::instance()
return static_manager;
}
bool ResourceManager::haveInstance()
{
return static_manager != nullptr;
}
ResourceManager::~ResourceManager()
{
assert(this == static_manager);

View File

@ -47,6 +47,8 @@ public:
static ResourceManager* instance();
static bool haveInstance();
static void reset();
/**