Fix KeyValuePairAt
memory leak
This commit is contained in:
parent
1906b59675
commit
1fdfc379b6
1 changed files with 2 additions and 4 deletions
|
@ -237,10 +237,8 @@ int32_t godot_icall_Dictionary_KeyValuePairs(Dictionary *ptr, Array **keys, Arra
|
||||||
}
|
}
|
||||||
|
|
||||||
void godot_icall_Dictionary_KeyValuePairAt(Dictionary *ptr, int index, MonoObject **key, MonoObject **value) {
|
void godot_icall_Dictionary_KeyValuePairAt(Dictionary *ptr, int index, MonoObject **key, MonoObject **value) {
|
||||||
Array *keys = godot_icall_Dictionary_Keys(ptr);
|
*key = GDMonoMarshal::variant_to_mono_object(ptr->get_key_at_index(index));
|
||||||
Array *values = godot_icall_Dictionary_Values(ptr);
|
*value = GDMonoMarshal::variant_to_mono_object(ptr->get_value_at_index(index));
|
||||||
*key = GDMonoMarshal::variant_to_mono_object(keys->get(index));
|
|
||||||
*value = GDMonoMarshal::variant_to_mono_object(values->get(index));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void godot_icall_Dictionary_Add(Dictionary *ptr, MonoObject *key, MonoObject *value) {
|
void godot_icall_Dictionary_Add(Dictionary *ptr, MonoObject *key, MonoObject *value) {
|
||||||
|
|
Loading…
Reference in a new issue