remove memory leaks
This commit is contained in:
parent
dd533552bb
commit
e197d3f219
|
@ -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";}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue