Fix memory leak in VariableData

Originally committed to SVN as r4577.
This commit is contained in:
Thomas Goyne 2010-06-24 01:24:21 +00:00
parent cf9eef80ab
commit 627d423017
2 changed files with 4 additions and 4 deletions

View File

@ -70,7 +70,7 @@ AssFile::AssFile () {
/// @brief AssFile destructor
AssFile::~AssFile() {
Clear();
delete_clear(Line);
}
void AssFile::Load (const wxString &_filename,wxString charset,bool addToRecent) {

View File

@ -43,13 +43,13 @@
#include "variable_data.h"
/// @brief Constructor
VariableData::VariableData () {
VariableData::VariableData() {
type = VARDATA_NONE;
value = NULL;
}
/// @brief Destructor
VariableData::~VariableData () {
VariableData::~VariableData() {
DeleteValue ();
}
@ -64,7 +64,7 @@ void VariableData::DeleteValue () {
case VARDATA_TEXT: delete value_text; break;
case VARDATA_BOOL: delete value_bool; break;
case VARDATA_COLOUR: delete value_colour; break;
case VARDATA_BLOCK: delete value_block; break;
case VARDATA_BLOCK: delete *value_block; delete value_block; break;
default: break;
}
type = VARDATA_NONE;