diff --git a/docs/02.API-REFERENCE.md b/docs/02.API-REFERENCE.md index 2cf45077c..8c319cf99 100644 --- a/docs/02.API-REFERENCE.md +++ b/docs/02.API-REFERENCE.md @@ -2817,8 +2817,9 @@ jerry_free_property_descriptor_fields (const jerry_property_descriptor_t *prop_d **Summary** -Call function specified by a function value. Error flag -must not be set for any arguments of this function. +Call function specified by a function value. Error flag must +not be set for any arguments of this function. Value of `this` +parameter should be set to `undefined` for non-method calls. *Note*: Returned value must be freed with [jerry_release_value](#jerry_release_value) when it is no longer needed. @@ -2860,6 +2861,8 @@ jerry_call_function (const jerry_value_t func_obj_val, jerry_release_value (ret_val); jerry_release_value (this_val); } + + jerry_release_value (val); } ```