[Cmake-commits] CMake branch, next, updated. v2.8.12.1-4912-g33ea043
Brad King
brad.king at kitware.com
Fri Nov 8 09:43:00 EST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 33ea043b7d4e31ba2cdf0e2ca61289099a235a16 (commit)
via 00055ce76d947ee0a35394edcafee1e85df5da53 (commit)
from 2901d3b284d8a4f8e1022fa5735e5f7bcd146767 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=33ea043b7d4e31ba2cdf0e2ca61289099a235a16
commit 33ea043b7d4e31ba2cdf0e2ca61289099a235a16
Merge: 2901d3b 00055ce
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 8 09:42:54 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Nov 8 09:42:54 2013 -0500
Merge topic 'clear-generator-data' into next
00055ce cmExportSetMap: Override clear() to delete held resources
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=00055ce76d947ee0a35394edcafee1e85df5da53
commit 00055ce76d947ee0a35394edcafee1e85df5da53
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 8 09:33:50 2013 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Nov 8 09:35:56 2013 -0500
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.
diff --git a/Source/cmExportSetMap.cxx b/Source/cmExportSetMap.cxx
index 96fdb3e..5174118 100644
--- a/Source/cmExportSetMap.cxx
+++ b/Source/cmExportSetMap.cxx
@@ -23,7 +23,7 @@ cmExportSet* cmExportSetMap::operator[](const std::string &name)
return it->second;
}
-cmExportSetMap::~cmExportSetMap()
+void cmExportSetMap::clear()
{
for(std::map<std::string, cmExportSet*>::iterator it = this->begin();
it != this->end();
@@ -31,4 +31,10 @@ cmExportSetMap::~cmExportSetMap()
{
delete it->second;
}
+ this->derived::clear();
+}
+
+cmExportSetMap::~cmExportSetMap()
+{
+ this->clear();
}
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();
};
-----------------------------------------------------------------------
Summary of changes:
Source/cmExportSetMap.cxx | 8 +++++++-
Source/cmExportSetMap.h | 3 +++
2 files changed, 10 insertions(+), 1 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list