Fix memory release

develop
kaetemi 4 years ago
parent 0ba45054d0
commit 64b978b77a

@ -58,12 +58,8 @@ public:
static CFactory &instance()
{
// Singleton instance pointer.
static CFactory *instance = NULL;
if (!instance)
{
instance = new CFactory();
}
return *instance;
static CFactory instance;
return instance;
}
/** Register a factorable object in the factory.
@ -185,12 +181,8 @@ public:
/// Get the singleton instance reference.
static CFactoryIndirect &instance()
{
static CFactoryIndirect *instance = NULL;
if (!instance)
{
instance = new CFactoryIndirect();
}
return *instance;
static CFactoryIndirect instance;
return instance;
}
void registerClass(const KeyType &key, IFactoryIndirectRegister<BaseFactoryClass> *factoryRegister)

Loading…
Cancel
Save