mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 12:53:09 +00:00
Fix memory leaks, patch by Samuel Serapión
svn path=/trunk/; revision=33082
This commit is contained in:
parent
24328c0181
commit
390cff7a1a
5 changed files with 26 additions and 8 deletions
|
@ -57,6 +57,10 @@ Define::Define ( const Project& project,
|
||||||
|
|
||||||
Define::~Define ()
|
Define::~Define ()
|
||||||
{
|
{
|
||||||
|
// if ( node )
|
||||||
|
// delete node;
|
||||||
|
// if ( module )
|
||||||
|
// delete module;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -240,3 +240,10 @@ Directory::CreateRule ( FILE* f,
|
||||||
i->second->CreateRule ( f, path );
|
i->second->CreateRule ( f, path );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Directory::~Directory()
|
||||||
|
{
|
||||||
|
std::map<std::string, Directory*>::iterator theIterator;
|
||||||
|
for ( theIterator = subdirs.begin (); theIterator != subdirs.end (); theIterator++ )
|
||||||
|
delete theIterator->second;
|
||||||
|
}
|
||||||
|
|
|
@ -494,6 +494,11 @@ Module::~Module ()
|
||||||
delete bootstrap;
|
delete bootstrap;
|
||||||
if ( importLibrary )
|
if ( importLibrary )
|
||||||
delete importLibrary;
|
delete importLibrary;
|
||||||
|
if ( dependency )
|
||||||
|
delete dependency;
|
||||||
|
if ( autoRegister )
|
||||||
|
delete autoRegister;
|
||||||
|
if ( output )
|
||||||
delete output;
|
delete output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -195,6 +195,7 @@ Project::~Project ()
|
||||||
delete cdfiles[i];
|
delete cdfiles[i];
|
||||||
for ( i = 0; i < installfiles.size (); i++ )
|
for ( i = 0; i < installfiles.size (); i++ )
|
||||||
delete installfiles[i];
|
delete installfiles[i];
|
||||||
|
if ( head )
|
||||||
delete head;
|
delete head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +253,7 @@ Project::ResolveProperties ( const string& s ) const
|
||||||
void
|
void
|
||||||
Project::SetConfigurationOption ( char* s,
|
Project::SetConfigurationOption ( char* s,
|
||||||
string name,
|
string name,
|
||||||
string* alternativeName )
|
string alternativeName )
|
||||||
{
|
{
|
||||||
const Property* property = LookupProperty ( name );
|
const Property* property = LookupProperty ( name );
|
||||||
if ( property != NULL && property->value.length () > 0 )
|
if ( property != NULL && property->value.length () > 0 )
|
||||||
|
@ -268,11 +269,11 @@ Project::SetConfigurationOption ( char* s,
|
||||||
"#define %s\n",
|
"#define %s\n",
|
||||||
property->name.c_str () );
|
property->name.c_str () );
|
||||||
}
|
}
|
||||||
else if ( alternativeName != NULL )
|
else if ( !alternativeName.empty() )
|
||||||
{
|
{
|
||||||
s = s + sprintf ( s,
|
s = s + sprintf ( s,
|
||||||
"#define %s\n",
|
"#define %s\n",
|
||||||
alternativeName->c_str () );
|
alternativeName.c_str () );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,7 +281,7 @@ void
|
||||||
Project::SetConfigurationOption ( char* s,
|
Project::SetConfigurationOption ( char* s,
|
||||||
string name )
|
string name )
|
||||||
{
|
{
|
||||||
SetConfigurationOption ( s, name, NULL );
|
SetConfigurationOption ( s, name, "" );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -301,7 +302,7 @@ Project::WriteConfigurationFile ()
|
||||||
|
|
||||||
SetConfigurationOption ( s, "ARCH" );
|
SetConfigurationOption ( s, "ARCH" );
|
||||||
SetConfigurationOption ( s, "OPTIMIZED" );
|
SetConfigurationOption ( s, "OPTIMIZED" );
|
||||||
SetConfigurationOption ( s, "MP", new string ( "UP" ) );
|
SetConfigurationOption ( s, "MP", "UP");
|
||||||
SetConfigurationOption ( s, "ACPI" );
|
SetConfigurationOption ( s, "ACPI" );
|
||||||
SetConfigurationOption ( s, "_3GB" );
|
SetConfigurationOption ( s, "_3GB" );
|
||||||
|
|
||||||
|
|
|
@ -134,6 +134,7 @@ public:
|
||||||
std::string name;
|
std::string name;
|
||||||
directory_map subdirs;
|
directory_map subdirs;
|
||||||
Directory ( const std::string& name );
|
Directory ( const std::string& name );
|
||||||
|
~Directory();
|
||||||
void Add ( const char* subdir );
|
void Add ( const char* subdir );
|
||||||
void GenerateTree ( DirectoryLocation root,
|
void GenerateTree ( DirectoryLocation root,
|
||||||
bool verbose );
|
bool verbose );
|
||||||
|
@ -256,7 +257,7 @@ private:
|
||||||
const Property* LookupProperty ( const std::string& name ) const;
|
const Property* LookupProperty ( const std::string& name ) const;
|
||||||
void SetConfigurationOption ( char* s,
|
void SetConfigurationOption ( char* s,
|
||||||
std::string name,
|
std::string name,
|
||||||
std::string* alternativeName );
|
std::string alternativeName );
|
||||||
void SetConfigurationOption ( char* s,
|
void SetConfigurationOption ( char* s,
|
||||||
std::string name );
|
std::string name );
|
||||||
void ReadXml ();
|
void ReadXml ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue