diff options
author | Wilson E. Alvarez <wilson.e.alvarez1@gmail.com> | 2017-08-24 12:51:28 -0400 |
---|---|---|
committer | Wilson E. Alvarez <wilson.e.alvarez1@gmail.com> | 2017-08-25 08:47:05 -0400 |
commit | 1577f4165374fc7c6d7f3031e463f0aab6e96faa (patch) | |
tree | 82bae3af4e17409446b8f11d69ee1bd0c61fcb36 /editor/plugins | |
parent | 3ea0943f645e5fda0b1bb68415e9c92ed4cf97dd (diff) |
Fixed several memory leaks
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.h | 1 |
2 files changed, 5 insertions, 0 deletions
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 |