fix some more memory leaks

svn path=/trunk/; revision=32533
This commit is contained in:
Christoph von Wittich 2008-02-29 13:26:28 +00:00
parent 039ca2f9c2
commit 4e921b8071
6 changed files with 38 additions and 0 deletions

View file

@ -34,6 +34,14 @@ CDFile::ReplaceVariable ( const string& name,
return path; return path;
} }
CDFile::~CDFile ()
{
if ( source )
delete target;
if ( source )
delete target;
}
CDFile::CDFile ( const Project& project, CDFile::CDFile ( const Project& project,
const XMLElement& cdfileNode, const XMLElement& cdfileNode,
const string& path ) const string& path )

View file

@ -58,6 +58,9 @@ CompilationUnit::~CompilationUnit ()
size_t i; size_t i;
for ( i = 0; i < files.size (); i++ ) for ( i = 0; i < files.size (); i++ )
delete files[i]; delete files[i];
if ( default_name )
delete default_name;
} }
void void

View file

@ -53,6 +53,8 @@ Include::Include ( const Project& project,
Include::~Include() Include::~Include()
{ {
if ( directory )
delete directory;
} }
void void

View file

@ -22,6 +22,15 @@
using std::string; using std::string;
InstallFile::~InstallFile()
{
if ( source )
delete source;
if ( target )
delete source;
}
InstallFile::InstallFile ( const Project& project, InstallFile::InstallFile ( const Project& project,
const XMLElement& installfileNode, const XMLElement& installfileNode,
const string& path ) const string& path )

View file

@ -490,6 +490,12 @@ Module::~Module ()
delete install; delete install;
if ( output ) if ( output )
delete output; delete output;
if ( metadata )
delete metadata;
if ( bootstrap )
delete bootstrap;
if ( importLibrary )
delete importLibrary;
} }
void void
@ -1590,6 +1596,13 @@ Metadata::Metadata ( const XMLElement& _node,
} }
ImportLibrary::~ImportLibrary ()
{
if ( source )
delete source;
}
ImportLibrary::ImportLibrary ( const Project& project, ImportLibrary::ImportLibrary ( const Project& project,
const XMLElement& node, const XMLElement& node,
const Module& module ) const Module& module )

View file

@ -569,6 +569,7 @@ public:
ImportLibrary ( const Project& project, ImportLibrary ( const Project& project,
const XMLElement& node, const XMLElement& node,
const Module& module ); const Module& module );
~ImportLibrary ();
}; };
@ -816,6 +817,7 @@ public:
CDFile ( const Project& project, CDFile ( const Project& project,
const XMLElement& bootstrapNode, const XMLElement& bootstrapNode,
const std::string& path ); const std::string& path );
~CDFile ();
private: private:
static std::string ReplaceVariable ( const std::string& name, static std::string ReplaceVariable ( const std::string& name,
const std::string& value, const std::string& value,
@ -832,6 +834,7 @@ public:
InstallFile ( const Project& project, InstallFile ( const Project& project,
const XMLElement& bootstrapNode, const XMLElement& bootstrapNode,
const std::string& path ); const std::string& path );
~InstallFile ();
}; };