Fix potential memory leak.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-12-21 22:40:01 +02:00
parent 3a8fd53dc8
commit 82c48ef4c3
2 changed files with 10 additions and 10 deletions

View File

@ -141,16 +141,16 @@ VPE::VProperty* VPE::VPropertyFactoryManager::createProperty(const QString& type
}
// cppcheck-suppress unusedFunction
VPE::VPropertyFactoryManager *VPE::VPropertyFactoryManager::getDefaultManager()
{
if (!DefaultManager)
{
DefaultManager = new VPropertyFactoryManager();
/*VStandardPropertyFactory* tmpStandardProp = */new VStandardPropertyFactory(DefaultManager);
}
//VPE::VPropertyFactoryManager *VPE::VPropertyFactoryManager::getDefaultManager()
//{
// if (!DefaultManager)
// {
// DefaultManager = new VPropertyFactoryManager();
// /*VStandardPropertyFactory* tmpStandardProp = */new VStandardPropertyFactory(DefaultManager);
// }
return DefaultManager;
}
// return DefaultManager;
//}
// cppcheck-suppress unusedFunction
QStringList VPE::VPropertyFactoryManager::getSupportedTypes()

View File

@ -80,7 +80,7 @@ public:
const QString& default_value = QString());
//! Returns the default manager.
static VPropertyFactoryManager* getDefaultManager();
//static VPropertyFactoryManager* getDefaultManager();
//! Returns a list of all supported property types
QStringList getSupportedTypes();