Browse Source

Explicitly destroy Vector2

John 1 month ago
parent
commit
e24d1809ef
1 changed files with 2 additions and 1 deletions
  1. 2 1
      tutorials/scripting/gdextension/gdextension_c_example.rst

+ 2 - 1
tutorials/scripting/gdextension/gdextension_c_example.rst

@@ -2010,8 +2010,9 @@ implement the helper function.
         // Call the function.
         // Call the function.
         api.object_method_bind_call(p_method_bind, p_instance, args, 2, &ret, NULL);
         api.object_method_bind_call(p_method_bind, p_instance, args, 2, &ret, NULL);
 
 
-        // Destroy the arguments that need it.
+        // Destroy the arguments.
         destructors.variant_destroy(&arg1);
         destructors.variant_destroy(&arg1);
+        destructors.variant_destroy(&arg2);
         destructors.variant_destroy(&ret);
         destructors.variant_destroy(&ret);
     }
     }