summaryrefslogtreecommitdiffstats
path: root/Source/cmLoadCommandCommand.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-09-17 14:38:00 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-09-17 14:38:00 (GMT)
commit0a2f6c876caa216e9ce9fdc662b8d70335d4738a (patch)
tree8a7f0ea832514f44082d3f841446b0f9c76f29b6 /Source/cmLoadCommandCommand.cxx
parentd17830ee5e9d44e8874880e33b038170ad8700d0 (diff)
downloadCMake-0a2f6c876caa216e9ce9fdc662b8d70335d4738a.zip
CMake-0a2f6c876caa216e9ce9fdc662b8d70335d4738a.tar.gz
CMake-0a2f6c876caa216e9ce9fdc662b8d70335d4738a.tar.bz2
added destructor to loaded commands
Diffstat (limited to 'Source/cmLoadCommandCommand.cxx')
-rw-r--r--Source/cmLoadCommandCommand.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx
index 3c098f5..7dec12c 100644
--- a/Source/cmLoadCommandCommand.cxx
+++ b/Source/cmLoadCommandCommand.cxx
@@ -28,6 +28,9 @@ public:
this->info.CAPI = &cmStaticCAPI;
}
+ ///! clean up any memory allocated by the plugin
+ ~cmLoadedCommand();
+
/**
* This is a virtual constructor for the command.
*/
@@ -139,7 +142,14 @@ void cmLoadedCommand::FinalPass()
{
this->info.FinalPass((void *)&this->info,(void *)this->m_Makefile);
}
-
+}
+
+cmLoadedCommand::~cmLoadedCommand()
+{
+ if (this->info.Destructor)
+ {
+ this->info.Destructor((void *)&this->info);
+ }
}
// cmLoadCommandCommand