You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Don't box params on Native->C# calls with Variant params
Godot uses Variant parameters for calls to script methods. Up until now we were boxing such parameters when marshalling them for invokation, even if they were value types. Now Godot allocates the marshalled parameters on the stack, reducing the GC allocations resulted from boxing.
This commit is contained in:
committed by
Raul Santos
parent
a05aefb74b
commit
b775573a21
@@ -2479,7 +2479,7 @@ bool CSharpScript::_get_signal(GDMonoClass *p_class, GDMonoClass *p_delegate, Ve
|
||||
|
||||
if (mono_type_get_type(raw_type) == MONO_TYPE_CLASS) {
|
||||
// Arguments are accessibles as arguments of .Invoke method
|
||||
GDMonoMethod *invoke = p_delegate->get_method("Invoke", -1);
|
||||
GDMonoMethod *invoke = p_delegate->get_method(mono_get_delegate_invoke(p_delegate->get_mono_ptr()));
|
||||
|
||||
Vector<StringName> names;
|
||||
Vector<ManagedType> types;
|
||||
|
||||
Reference in New Issue
Block a user