diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-01-04 10:26:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-04 10:26:47 +0100 |
commit | c5ff2cb3d9bca0478e3abce7540e3b831fa5ef37 (patch) | |
tree | f5a238b329a914a4868509f5e3c4cd6d67d4666c /editor/plugins | |
parent | fcb0f0d7700d56069d95148812bda1da45c29b64 (diff) | |
parent | 8e7cbf315ea97f95ec0f54870162d19fcd025f4b (diff) |
Merge pull request #44907 from qarmin/fix_leak_gradient
Fix memory leak with Gradient in Node3DEditorViewport
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 9f710d218c..3e8547439f 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -4141,6 +4141,10 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, Edito EditorSettings::get_singleton()->connect("settings_changed", callable_mp(this, &Node3DEditorViewport::update_transform_gizmo_view)); } +Node3DEditorViewport::~Node3DEditorViewport() { + memdelete(frame_time_gradient); +} + ////////////////////////////////////////////////////////////// void Node3DEditorViewportContainer::_gui_input(const Ref<InputEvent> &p_event) { diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h index 624bc2d88a..0cefaa6557 100644 --- a/editor/plugins/node_3d_editor_plugin.h +++ b/editor/plugins/node_3d_editor_plugin.h @@ -483,6 +483,7 @@ public: Camera3D *get_camera() { return camera; } // return the default camera object. Node3DEditorViewport(Node3DEditor *p_spatial_editor, EditorNode *p_editor, int p_index); + ~Node3DEditorViewport(); }; class Node3DEditorSelectedItem : public Object { |