@@ -441,6 +441,9 @@ typedef jerry_value_t (*jerry_external_handler_t) (const jerry_value_t function_
441
441
442
442
Native free callback of an object. It is used in `jerry_object_native_info_t` and for external Array buffers.
443
443
444
+ *Note*:
445
+ - This callback method **must not** call any JerryScript API methods.
446
+
444
447
**Prototype**
445
448
446
449
```c
@@ -5542,7 +5545,8 @@ jerry_set_prototype (const jerry_value_t obj_val,
5542
5545
**Summary**
5543
5546
5544
5547
Get native pointer by the given type information.
5545
- The pointer and the type information are previously associated with the object by jerry_set_object_native_pointer.
5548
+ The pointer and the type information are previously associated with the object by
5549
+ [jerry_set_object_native_pointer](#jerry_set_object_native_pointer).
5546
5550
5547
5551
*Note*: `out_native_pointer_p` can be NULL, and it means the
5548
5552
caller doesn't want to get the native_pointer.
@@ -5749,15 +5753,15 @@ main (void)
5749
5753
**Summary**
5750
5754
5751
5755
Set native pointer and an optional type information for the specified object.
5752
- You can get them by calling jerry_get_object_native_pointer later.
5753
-
5754
- *Note*: If native pointer was already set for the object, its value is updated.
5756
+ You can get them by calling [jerry_get_object_native_pointer](#jerry_get_object_native_pointer) later.
5755
5757
5756
- *Note*: If a non-NULL free callback is specified in the native type information,
5757
- it will be called by the garbage collector when the object is freed.
5758
- This callback **must not** invoke API functions.
5759
- The type info always overwrites the previous value, so passing
5760
- a NULL value deletes the current type info.
5758
+ *Notes*:
5759
+ - If a native pointer was already set for the object with the same type information, its value is updated.
5760
+ - If a non-NULL free callback is specified in the native type information,
5761
+ it will be called by the garbage collector when the object is freed.
5762
+ - If the object is only referenced via the "global" object (or one of it's "child"),
5763
+ the free callback will be invoked during the execution of `jerry_cleanup`.
5764
+ - The free callback **must not** invoke API functions.
5761
5765
5762
5766
**Prototype**
5763
5767
@@ -5792,10 +5796,12 @@ best-practice example.
5792
5796
**Summary**
5793
5797
5794
5798
Delete the native pointer of the specified object associated with the given native type info.
5795
- You can get them by calling jerry_get_object_native_pointer later.
5796
5799
5797
- *Note *:
5800
+ *Notes *:
5798
5801
- If the specified object has no matching native pointer for the given native type info the operation has no effect.
5802
+ - The method does not invoke the free callback specified in the type info.
5803
+ If the native pointer should be freed then one must get the native pointer first and invoke the free callback manually
5804
+ before calling this method.
5799
5805
- This operation cannot throw an exception.
5800
5806
5801
5807
**Prototype**
0 commit comments