Repository: godot
Issue: C# bug - Nonexistent function 'free' in base 'Godot.ArrayMesh'
Labels: discussion,topic:core,documentation

### Godot version

v4.2.beta2.mono.official [f8818f85e]

### System information

Godot v4.2.beta2.mono - Fedora Linux 39 (KDE Plasma) - Wayland - Vulkan (Forward+) - dedicated AMD Radeon RX 570 Series (RADV POLARIS10) () - AMD Ryzen 5 2600 Six-Core Processor (12 Threads)

### Issue description

When calling `Free()` on an `ArrayMesh` from C#, it throws the following errors:

```
E 0:00:02:0215   NativeCalls.cs:6311 @ Godot.Variant Godot.NativeCalls.godot_icall_2_701(nint, nint, Godot.NativeInterop.godot_string_name, Godot.Variant[], Godot.NativeInterop.godot_string_name): Can't 'free' a reference.
  <C++ Error>    Method/function failed. Returning: Variant()
  <C++ Source>   core/object/object.cpp:732 @ callp()
  <Stack Trace>  NativeCalls.cs:6311 @ Godot.Variant Godot.NativeCalls.godot_icall_2_701(nint, nint, Godot.NativeInterop.godot_string_name, Godot.Variant[], Godot.NativeInterop.godot_string_name)
                 GodotObject.cs:618 @ Godot.Variant Godot.GodotObject.Call(Godot.StringName, Godot.Variant[])
                 GodotObject.cs:266 @ void Godot.GodotObject.Free()
                 CarPaint.cs:36 @ void CarPaint._Ready()
                 Node.cs:2121 @ bool Godot.Node.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 Node3D.cs:1035 @ bool Godot.Node3D.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 VisualInstance3D.cs:220 @ bool Godot.VisualInstance3D.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 GeometryInstance3D.cs:619 @ bool Godot.GeometryInstance3D.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 MeshInstance3D.cs:271 @ bool Godot.MeshInstance3D.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 CarPaint_ScriptMethods.generated.cs:38 @ bool CarPaint.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 CSharpInstanceBridge.cs:24 @ Godot.NativeInterop.godot_bool Godot.Bridge.CSharpInstanceBridge.Call(nint, Godot.NativeInterop.godot_string_name*, Godot.NativeInterop.godot_variant**, int, Godot.NativeInterop.godot_variant_call_error*, Godot.NativeInterop.godot_variant*)
                 Godot.NativeInterop.NativeFuncs.generated.cs:353 @ void Godot.NativeInterop.NativeFuncs.godotsharp_method_bind_ptrcall(nint, nint, System.Void**, System.Void*)
                 NativeCalls.cs:6156 @ void Godot.NativeCalls.godot_icall_3_690(nint, nint, nint, Godot.NativeInterop.godot_bool, int)
                 Node.cs:692 @ void Godot.Node.AddChild(Godot.Node, bool, Godot.Node+InternalMode)
                 GameplayDebugSetCarPlzReplace.cs:19 @ void GameplayDebugSetCarPlzReplace._Process(double)
                 Node.cs:2115 @ bool Godot.Node.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 Node3D.cs:1035 @ bool Godot.Node3D.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 GameplayDebugSetCarPlzReplace_ScriptMethods.generated.cs:38 @ bool GameplayDebugSetCarPlzReplace.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 CSharpInstanceBridge.cs:24 @ Godot.NativeInterop.godot_bool Godot.Bridge.CSharpInstanceBridge.Call(nint, Godot.NativeInterop.godot_string_name*, Godot.NativeInterop.godot_variant**, int, Godot.NativeInterop.godot_variant_call_error*, Godot.NativeInterop.godot_variant*)
E 0:00:02:0218   GD.cs:366 @ void Godot.GD.PushError(string): Invalid call. Nonexistent function 'free' in base 'Godot.ArrayMesh'.
  <C# Source>    /root/godot/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/ExceptionUtils.cs:147 @ void Godot.NativeInterop.ExceptionUtils.DebugCheckCallError(Godot.NativeInterop.godot_string_name, nint, Godot.NativeInterop.godot_variant**, int, Godot.NativeInterop.godot_variant_call_error)
  <Stack Trace>  GD.cs:366 @ void Godot.GD.PushError(string)
                 ExceptionUtils.cs:147 @ void Godot.NativeInterop.ExceptionUtils.DebugCheckCallError(Godot.NativeInterop.godot_string_name, nint, Godot.NativeInterop.godot_variant**, int, Godot.NativeInterop.godot_variant_call_error)
                 NativeCalls.cs:6312 @ Godot.Variant Godot.NativeCalls.godot_icall_2_701(nint, nint, Godot.NativeInterop.godot_string_name, Godot.Variant[], Godot.NativeInterop.godot_string_name)
                 GodotObject.cs:618 @ Godot.Variant Godot.GodotObject.Call(Godot.StringName, Godot.Variant[])
                 GodotObject.cs:266 @ void Godot.GodotObject.Free()
                 CarPaint.cs:36 @ void CarPaint._Ready()
                 Node.cs:2121 @ bool Godot.Node.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 Node3D.cs:1035 @ bool Godot.Node3D.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 VisualInstance3D.cs:220 @ bool Godot.VisualInstance3D.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 GeometryInstance3D.cs:619 @ bool Godot.GeometryInstance3D.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 MeshInstance3D.cs:271 @ bool Godot.MeshInstance3D.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 CarPaint_ScriptMethods.generated.cs:38 @ bool CarPaint.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 CSharpInstanceBridge.cs:24 @ Godot.NativeInterop.godot_bool Godot.Bridge.CSharpInstanceBridge.Call(nint, Godot.NativeInterop.godot_string_name*, Godot.NativeInterop.godot_variant**, int, Godot.NativeInterop.godot_variant_call_error*, Godot.NativeInterop.godot_variant*)
                 Godot.NativeInterop.NativeFuncs.generated.cs:353 @ void Godot.NativeInterop.NativeFuncs.godotsharp_method_bind_ptrcall(nint, nint, System.Void**, System.Void*)
                 NativeCalls.cs:6156 @ void Godot.NativeCalls.godot_icall_3_690(nint, nint, nint, Godot.NativeInterop.godot_bool, int)
                 Node.cs:692 @ void Godot.Node.AddChild(Godot.Node, bool, Godot.Node+InternalMode)
                 GameplayDebugSetCarPlzReplace.cs:19 @ void GameplayDebugSetCarPlzReplace._Process(double)
                 Node.cs:2115 @ bool Godot.Node.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 Node3D.cs:1035 @ bool Godot.Node3D.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 GameplayDebugSetCarPlzReplace_ScriptMethods.generated.cs:38 @ bool GameplayDebugSetCarPlzReplace.InvokeGodotClassMethod(Godot.NativeInterop.godot_string_name&, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
                 CSharpInstanceBridge.cs:24 @ Godot.NativeInterop.godot_bool Godot.Bridge.CSharpInstanceBridge.Call(nint, Godot.NativeInterop.godot_string_name*, Godot.NativeInterop.godot_variant**, int, Godot.NativeInterop.godot_variant_call_error*, Godot.NativeInterop.godot_variant*)
```

The omission looks intentional, but for some reason it's still in the C# bindings, just like `CancelFree`, but not `QueueFree`.

### Steps to reproduce

1. Open the project
2. Build and run the project, then look into the Debugger output

### Minimal reproduction project

[CSReprProj.zip](https://github.com/godotengine/godot/files/13112401/CSReprProj.zip)