summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx12
1 files changed, 2 insertions, 10 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 5e48157..4244b25 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -171,16 +171,8 @@ cmake::~cmake()
delete this->GlobalGenerator;
this->GlobalGenerator = 0;
}
- for(RegisteredCommandsMap::iterator j = this->Commands.begin();
- j != this->Commands.end(); ++j)
- {
- delete (*j).second;
- }
- for(RegisteredGeneratorsVector::iterator j = this->Generators.begin();
- j != this->Generators.end(); ++j)
- {
- delete *j;
- }
+ cmDeleteAll(this->Commands);
+ cmDeleteAll(this->Generators);
#ifdef CMAKE_BUILD_WITH_CMAKE
delete this->VariableWatch;
#endif