mirror of https://github.com/odrling/Aegisub
Fix memory leak in VariableData
Originally committed to SVN as r4577.
This commit is contained in:
parent
cf9eef80ab
commit
627d423017
|
@ -70,7 +70,7 @@ AssFile::AssFile () {
|
||||||
|
|
||||||
/// @brief AssFile destructor
|
/// @brief AssFile destructor
|
||||||
AssFile::~AssFile() {
|
AssFile::~AssFile() {
|
||||||
Clear();
|
delete_clear(Line);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AssFile::Load (const wxString &_filename,wxString charset,bool addToRecent) {
|
void AssFile::Load (const wxString &_filename,wxString charset,bool addToRecent) {
|
||||||
|
|
|
@ -43,13 +43,13 @@
|
||||||
#include "variable_data.h"
|
#include "variable_data.h"
|
||||||
|
|
||||||
/// @brief Constructor
|
/// @brief Constructor
|
||||||
VariableData::VariableData () {
|
VariableData::VariableData() {
|
||||||
type = VARDATA_NONE;
|
type = VARDATA_NONE;
|
||||||
value = NULL;
|
value = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @brief Destructor
|
/// @brief Destructor
|
||||||
VariableData::~VariableData () {
|
VariableData::~VariableData() {
|
||||||
DeleteValue ();
|
DeleteValue ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ void VariableData::DeleteValue () {
|
||||||
case VARDATA_TEXT: delete value_text; break;
|
case VARDATA_TEXT: delete value_text; break;
|
||||||
case VARDATA_BOOL: delete value_bool; break;
|
case VARDATA_BOOL: delete value_bool; break;
|
||||||
case VARDATA_COLOUR: delete value_colour; 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;
|
default: break;
|
||||||
}
|
}
|
||||||
type = VARDATA_NONE;
|
type = VARDATA_NONE;
|
||||||
|
|
Loading…
Reference in New Issue