From 1577f4165374fc7c6d7f3031e463f0aab6e96faa Mon Sep 17 00:00:00 2001 From: "Wilson E. Alvarez" Date: Thu, 24 Aug 2017 12:51:28 -0400 Subject: Fixed several memory leaks --- editor/plugins/canvas_item_editor_plugin.cpp | 4 ++++ editor/plugins/canvas_item_editor_plugin.h | 1 + 2 files changed, 5 insertions(+) (limited to 'editor/plugins') diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 79bf68b061..b5c237a61c 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -4114,3 +4114,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte label_desc->hide(); editor->get_gui_base()->add_child(label_desc); } + +CanvasItemEditorViewport::~CanvasItemEditorViewport() { + memdelete(preview); +} diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h index 9b027fda60..0291660d42 100644 --- a/editor/plugins/canvas_item_editor_plugin.h +++ b/editor/plugins/canvas_item_editor_plugin.h @@ -512,6 +512,7 @@ public: virtual void drop_data(const Point2 &p_point, const Variant &p_data); CanvasItemEditorViewport(EditorNode *p_node, CanvasItemEditor *p_canvas); + ~CanvasItemEditorViewport(); }; #endif -- cgit v1.2.3