mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 05:31:01 +00:00 
			
		
		
		
	Merge pull request #10625 from Rubonnek/fixed-leaks
Fixed several memory leaks
This commit is contained in:
		
						commit
						5976e8d7de
					
				
					 7 changed files with 13 additions and 1 deletions
				
			
		|  | @ -294,7 +294,6 @@ EditorHelpSearch::EditorHelpSearch() { | ||||||
| 	VBoxContainer *vbc = memnew(VBoxContainer); | 	VBoxContainer *vbc = memnew(VBoxContainer); | ||||||
| 	add_child(vbc); | 	add_child(vbc); | ||||||
| 
 | 
 | ||||||
| 	HBoxContainer *sb_hb = memnew(HBoxContainer); |  | ||||||
| 	search_box = memnew(LineEdit); | 	search_box = memnew(LineEdit); | ||||||
| 	vbc->add_child(search_box); | 	vbc->add_child(search_box); | ||||||
| 	search_box->connect("text_changed", this, "_text_changed"); | 	search_box->connect("text_changed", this, "_text_changed"); | ||||||
|  |  | ||||||
|  | @ -5484,6 +5484,7 @@ EditorNode::~EditorNode() { | ||||||
| 	memdelete(editor_plugins_over); | 	memdelete(editor_plugins_over); | ||||||
| 	memdelete(editor_plugins_force_input_forwarding); | 	memdelete(editor_plugins_force_input_forwarding); | ||||||
| 	memdelete(file_server); | 	memdelete(file_server); | ||||||
|  | 	memdelete(progress_hb); | ||||||
| 	EditorSettings::destroy(); | 	EditorSettings::destroy(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -260,6 +260,7 @@ static void _create_script_templates(const String &p_path) { | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	memdelete(dir); | ||||||
| 	memdelete(file); | 	memdelete(file); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -286,6 +287,7 @@ void EditorSettings::create() { | ||||||
| 		self_contained = true; | 		self_contained = true; | ||||||
| 		extra_config->load(exe_path + "/_sc_"); | 		extra_config->load(exe_path + "/_sc_"); | ||||||
| 	} | 	} | ||||||
|  | 	memdelete(d); | ||||||
| 
 | 
 | ||||||
| 	if (self_contained) { | 	if (self_contained) { | ||||||
| 		// editor is self contained
 | 		// editor is self contained
 | ||||||
|  |  | ||||||
|  | @ -4102,3 +4102,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte | ||||||
| 	label_desc->hide(); | 	label_desc->hide(); | ||||||
| 	editor->get_gui_base()->add_child(label_desc); | 	editor->get_gui_base()->add_child(label_desc); | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | CanvasItemEditorViewport::~CanvasItemEditorViewport() { | ||||||
|  | 	memdelete(preview); | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @ -512,6 +512,7 @@ public: | ||||||
| 	virtual void drop_data(const Point2 &p_point, const Variant &p_data); | 	virtual void drop_data(const Point2 &p_point, const Variant &p_data); | ||||||
| 
 | 
 | ||||||
| 	CanvasItemEditorViewport(EditorNode *p_node, CanvasItemEditor *p_canvas); | 	CanvasItemEditorViewport(EditorNode *p_node, CanvasItemEditor *p_canvas); | ||||||
|  | 	~CanvasItemEditorViewport(); | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  | @ -591,6 +591,9 @@ ScriptCreateDialog::ScriptCreateDialog() { | ||||||
| 	hb->add_child(vb); | 	hb->add_child(vb); | ||||||
| 	hb->add_child(empty_v->duplicate()); | 	hb->add_child(empty_v->duplicate()); | ||||||
| 
 | 
 | ||||||
|  | 	memdelete(empty_h); | ||||||
|  | 	memdelete(empty_v); | ||||||
|  | 
 | ||||||
| 	add_child(hb); | 	add_child(hb); | ||||||
| 
 | 
 | ||||||
| 	/* Language */ | 	/* Language */ | ||||||
|  |  | ||||||
|  | @ -538,6 +538,8 @@ void OS_X11::finalize() { | ||||||
| 	physics_2d_server->finish(); | 	physics_2d_server->finish(); | ||||||
| 	memdelete(physics_2d_server); | 	memdelete(physics_2d_server); | ||||||
| 
 | 
 | ||||||
|  | 	memdelete(power_manager); | ||||||
|  | 
 | ||||||
| 	if (xrandr_handle) | 	if (xrandr_handle) | ||||||
| 		dlclose(xrandr_handle); | 		dlclose(xrandr_handle); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Rémi Verschelde
						Rémi Verschelde