1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fix memory leaks with SyntaxHighlighters

This commit is contained in:
Paulb23
2019-07-25 17:30:48 +01:00
parent 510bb3789e
commit e51aa14208
5 changed files with 31 additions and 9 deletions

View File

@@ -695,5 +695,14 @@ TextEditor::TextEditor() {
code_editor->get_text_edit()->set_drag_forwarding(this);
}
TextEditor::~TextEditor() {
for (const Map<String, SyntaxHighlighter *>::Element *E = highlighters.front(); E; E = E->next()) {
if (E->get() != NULL) {
memdelete(E->get());
}
}
highlighters.clear();
}
void TextEditor::validate() {
}