Merge pull request #44907 from qarmin/fix_leak_gradient

Fix memory leak with Gradient in Node3DEditorViewport
This commit is contained in:
Rémi Verschelde 2021-01-04 10:26:47 +01:00 committed by GitHub
commit c5ff2cb3d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -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)); 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) { void Node3DEditorViewportContainer::_gui_input(const Ref<InputEvent> &p_event) {

View File

@ -483,6 +483,7 @@ public:
Camera3D *get_camera() { return camera; } // return the default camera object. Camera3D *get_camera() { return camera; } // return the default camera object.
Node3DEditorViewport(Node3DEditor *p_spatial_editor, EditorNode *p_editor, int p_index); Node3DEditorViewport(Node3DEditor *p_spatial_editor, EditorNode *p_editor, int p_index);
~Node3DEditorViewport();
}; };
class Node3DEditorSelectedItem : public Object { class Node3DEditorSelectedItem : public Object {