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 // cppcheck-suppress unusedFunction
VPE::VPropertyFactoryManager *VPE::VPropertyFactoryManager::getDefaultManager() //VPE::VPropertyFactoryManager *VPE::VPropertyFactoryManager::getDefaultManager()
{ //{
if (!DefaultManager) // if (!DefaultManager)
{ // {
DefaultManager = new VPropertyFactoryManager(); // DefaultManager = new VPropertyFactoryManager();
/*VStandardPropertyFactory* tmpStandardProp = */new VStandardPropertyFactory(DefaultManager); // /*VStandardPropertyFactory* tmpStandardProp = */new VStandardPropertyFactory(DefaultManager);
} // }
return DefaultManager; // return DefaultManager;
} //}
// cppcheck-suppress unusedFunction // cppcheck-suppress unusedFunction
QStringList VPE::VPropertyFactoryManager::getSupportedTypes() QStringList VPE::VPropertyFactoryManager::getSupportedTypes()

View file

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