I am using a lot of signals with custom classes like
public partial class SignalArgs : GodotObject
{
// arguments...
}
[Signal] public delegate void TestEventHandler(SignalArgs args);
The docs for the GodotObject say that Objects must be freed, so no memory leaks will be created.
Do I need to remove them manually or will they be collected by the garbage collector?
Very crudely: Godot objects can be seen in two parts: a managed one (the object in the CLR), and a native one. For non RefCounted objects, the native part holds a reference on the managed one, which prevents it from being collected by the GC. Calling .Free() releases the native part, dropping that reference, eventually leading to collection of the managed part by the GC.