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
|
||||
AssFile::~AssFile() {
|
||||
Clear();
|
||||
delete_clear(Line);
|
||||
}
|
||||
|
||||
void AssFile::Load (const wxString &_filename,wxString charset,bool addToRecent) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue