Commit e197d3f2 authored by Bill Hoffman's avatar Bill Hoffman

remove memory leaks

parent dd533552
......@@ -773,6 +773,7 @@ void CMakeSetupDialog::OnOk()
{
m_CacheEntriesList.ClearDirty();
this->RunCMake(true);
cmMakefileGenerator::UnRegisterGenerators();
CDialog::OnOK();
}
......
......@@ -52,7 +52,7 @@ void cmMakefileGenerator::SetMakefile(cmMakefile* mf)
void cmMakefileGenerator::UnRegisterGenerators()
{
for(std::map<cmStdString, cmMakefileGenerator*>::iterator i
for(std::map<cmStdString, cmMakefileGenerator*>::iterator i
= s_RegisteredGenerators.begin();
i != s_RegisteredGenerators.end(); ++i)
{
......
......@@ -131,7 +131,7 @@ inline bool operator==(std::string const& a, const char* b)
{ return (a==std::string(b)); }
# endif // end CM_SGI_CC_720
// use this class to shring the size of symbols in .o files
// use this class to shrink the size of symbols in .o files
// std::string is really basic_string<....lots of stuff....>
// when combined with a map or set, the symbols can be > 2000 chars!
struct cmStdString : public std::string
......
......@@ -53,6 +53,11 @@ cmUnixMakefileGenerator::cmUnixMakefileGenerator()
m_Recurse = false;
}
cmUnixMakefileGenerator::~cmUnixMakefileGenerator()
{
}
void cmUnixMakefileGenerator::GenerateMakefile()
{
// suppoirt override in output directories
......
......@@ -56,6 +56,8 @@ public:
///! Set cache only and recurse to false by default.
cmUnixMakefileGenerator();
~cmUnixMakefileGenerator();
///! Get the name for the generator.
virtual const char* GetName() {return "Unix Makefiles";}
......
#include "cmake.h"
#include "cmMakefileGenerator.h"
int main(int ac, char** av)
{
......@@ -8,5 +9,7 @@ int main(int ac, char** av)
{
args.push_back(av[i]);
}
return cm.Generate(args);
int ret = cm.Generate(args);
cmMakefileGenerator::UnRegisterGenerators();
return ret;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment