You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since I only noticed this in CI, I do not have a direct project for reproduction. I just looked at the code to create my theory for the cause.
And tbh, it’s an extremely minor issue: IF the user incorrectly calls the extension API (duplicated method names), THEN a tiny amount of memory is leaked ONE time at startup.
Tested versions
nightly
System information
linux
Issue description
While working on something unrelated, I got a memcheck failure in CI: https://github.com/godot-rust/gdext/actions/runs/12881698201/job/35912681146#step:3:1706
Looking into that error,
method
is allocated in L509 and passed intoClassDB::bind_method_custom
.godot/core/extension/gdextension.cpp
Lines 508 to 520 in 1b7b009
If, for some reason, a method with the same name was already registered, it returns an error:
godot/core/object/class_db.cpp
Lines 1879 to 1882 in 1b7b009
The fix might be as simple as freeing
p_method
before returning.Steps to reproduce
none
Minimal reproduction project (MRP)
none
The text was updated successfully, but these errors were encountered: