summaryrefslogtreecommitdiffstats
path: root/Source/cmExportSetMap.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-08 14:33:50 (GMT)
committerBrad King <brad.king@kitware.com>2013-11-08 14:35:56 (GMT)
commit00055ce76d947ee0a35394edcafee1e85df5da53 (patch)
treea26de97085b5460379f2c87eaf2500c2a70bc7e3 /Source/cmExportSetMap.h
parent5cf1120fbf11fcc6bb5f5f15b0e2c8472bafc261 (diff)
downloadCMake-00055ce76d947ee0a35394edcafee1e85df5da53.zip
CMake-00055ce76d947ee0a35394edcafee1e85df5da53.tar.gz
CMake-00055ce76d947ee0a35394edcafee1e85df5da53.tar.bz2
cmExportSetMap: Override clear() to delete held resources
Replace the std::map<>::clear() method with one that first deletes the cmExportSet instances held by each map entry, and then clears. Otherwise the cmGlobalGenerator::ClearGeneratorMembers added by commit 5cf1120f (cmGlobalGenerator: Refactor member cleanup between configures, 2013-11-04) leaks the cmExportSet instances.
Diffstat (limited to 'Source/cmExportSetMap.h')
-rw-r--r--Source/cmExportSetMap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmExportSetMap.h b/Source/cmExportSetMap.h
index 4663c55..965046c 100644
--- a/Source/cmExportSetMap.h
+++ b/Source/cmExportSetMap.h
@@ -18,6 +18,7 @@ class cmExportSet;
/// A name -> cmExportSet map with overloaded operator[].
class cmExportSetMap : public std::map<std::string, cmExportSet*>
{
+ typedef std::map<std::string, cmExportSet*> derived;
public:
/** \brief Overloaded operator[].
*
@@ -26,6 +27,8 @@ public:
*/
cmExportSet* operator[](const std::string &name);
+ void clear();
+
/// Overloaded destructor deletes all member export sets.
~cmExportSetMap();
};