From 7a3ecf5ed5eb12d39f4fb14c821efda0b6a64031 Mon Sep 17 00:00:00 2001 From: Nicolas Despres Date: Sat, 21 Jul 2012 19:51:55 +0200 Subject: Fix memory leak in Makefile generator. This was introduced by 5d885db416a. --- Source/cmMakefileUtilityTargetGenerator.cxx | 7 +++++++ Source/cmMakefileUtilityTargetGenerator.h | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx index e8afd45..4456aa7 100644 --- a/Source/cmMakefileUtilityTargetGenerator.cxx +++ b/Source/cmMakefileUtilityTargetGenerator.cxx @@ -33,6 +33,13 @@ cmMakefileUtilityTargetGenerator } //---------------------------------------------------------------------------- +cmMakefileUtilityTargetGenerator +::~cmMakefileUtilityTargetGenerator() +{ + delete this->OSXBundleGenerator; +} + +//---------------------------------------------------------------------------- void cmMakefileUtilityTargetGenerator::WriteRuleFiles() { this->CreateRuleFile(); diff --git a/Source/cmMakefileUtilityTargetGenerator.h b/Source/cmMakefileUtilityTargetGenerator.h index 99c16fc..fc47b38 100644 --- a/Source/cmMakefileUtilityTargetGenerator.h +++ b/Source/cmMakefileUtilityTargetGenerator.h @@ -14,16 +14,17 @@ #include "cmMakefileTargetGenerator.h" -class cmMakefileUtilityTargetGenerator: +class cmMakefileUtilityTargetGenerator: public cmMakefileTargetGenerator { public: cmMakefileUtilityTargetGenerator(cmTarget* target); + virtual ~cmMakefileUtilityTargetGenerator(); /* the main entry point for this class. Writes the Makefiles associated with this target */ - virtual void WriteRuleFiles(); - + virtual void WriteRuleFiles(); + protected: }; -- cgit v0.12