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:
parent
e39036a635
commit
f95cbd703a
@ -49,6 +49,11 @@ ResourceManager* ResourceManager::instance()
|
|||||||
return static_manager;
|
return static_manager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ResourceManager::haveInstance()
|
||||||
|
{
|
||||||
|
return static_manager != nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
ResourceManager::~ResourceManager()
|
ResourceManager::~ResourceManager()
|
||||||
{
|
{
|
||||||
assert(this == static_manager);
|
assert(this == static_manager);
|
||||||
|
@ -47,6 +47,8 @@ public:
|
|||||||
|
|
||||||
static ResourceManager* instance();
|
static ResourceManager* instance();
|
||||||
|
|
||||||
|
static bool haveInstance();
|
||||||
|
|
||||||
static void reset();
|
static void reset();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user