From 82c48ef4c3ed3f0e3e89557e306cc7bf5cc9bb39 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Wed, 21 Dec 2016 22:40:01 +0200 Subject: [PATCH] Fix potential memory leak. --HG-- branch : develop --- .../vpropertyfactorymanager.cpp | 18 +++++++++--------- .../vpropertyfactorymanager.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/libs/vpropertyexplorer/vpropertyfactorymanager.cpp b/src/libs/vpropertyexplorer/vpropertyfactorymanager.cpp index 0fdc1ad09..55877c8e1 100644 --- a/src/libs/vpropertyexplorer/vpropertyfactorymanager.cpp +++ b/src/libs/vpropertyexplorer/vpropertyfactorymanager.cpp @@ -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() diff --git a/src/libs/vpropertyexplorer/vpropertyfactorymanager.h b/src/libs/vpropertyexplorer/vpropertyfactorymanager.h index a17792e21..136b2b2ea 100644 --- a/src/libs/vpropertyexplorer/vpropertyfactorymanager.h +++ b/src/libs/vpropertyexplorer/vpropertyfactorymanager.h @@ -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();