Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid leak of the InputMapUpdater instance #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

florianvazelle
Copy link

@florianvazelle florianvazelle commented Jul 14, 2023

Hi, according to the Godot Documentation, when a node is creating with the new method, we need to free it from memory with the queue_free method.

Below, the commands I ran after pulling the project :

Before :

$ godot --headless --quit --verbose
Godot Engine v4.0.3.stable.official.5222a99f5 - https://godotengine.org
...
Loading resource: res://addons/EasyMenus/Nodes/menu_template_manager.tscn
Loaded builtin certs
...
ERROR: Condition "_first != nullptr" is true.
   at: ~List (./core/templates/self_list.h:106)
WARNING: ObjectDB instances leaked at exit (run with --verbose for details).
     at: cleanup (core/object/object.cpp:1982)
Leaked instance: GDScriptNativeClass:-9223138390633873009
Leaked instance: GDScript:-9222563895808359228 - Resource path: res://addons/EasyMenus/Scripts/input_map_updater.gd
Leaked instance: Node:991759488255175 - Node name: 
Hint: Leaked instances typically happen when nodes are removed from the scene tree (with `remove_child()`) but not freed (with `free()` or `queue_free()`).
ERROR: Resources still in use at exit (run with --verbose for details).
   at: clear (core/io/resource.cpp:489)
Resource still in use: res://addons/EasyMenus/Scripts/input_map_updater.gd (GDScript)
...

After :

$ godot --headless --quit --verbose
Godot Engine v4.0.3.stable.official.5222a99f5 - https://godotengine.org
...
Loading resource: res://addons/EasyMenus/Nodes/menu_template_manager.tscn
Loaded builtin certs
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant