aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc/src/erl_nif.xml
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2019-05-22 17:48:00 +0200
committerSverker Eriksson <[email protected]>2019-05-22 17:56:31 +0200
commit7d54af059fffd27286f6a236470a9096c09921a9 (patch)
treeb6f12840bec6f4d7cc7418d91c861848fdbfde0d /erts/doc/src/erl_nif.xml
parentf8d2dfc06b599b8e3335a2afef89c763b01d6f55 (diff)
downloadotp-7d54af059fffd27286f6a236470a9096c09921a9.tar.gz
otp-7d54af059fffd27286f6a236470a9096c09921a9.tar.bz2
otp-7d54af059fffd27286f6a236470a9096c09921a9.zip
erts: Add some erl_nif doc clarifications
Diffstat (limited to 'erts/doc/src/erl_nif.xml')
-rw-r--r--erts/doc/src/erl_nif.xml7
1 files changed, 7 insertions, 0 deletions
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index f88d255296..d74ae23a93 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -1495,6 +1495,9 @@ enif_free_iovec(iovec);]]></code>
<c>term</c>.</p>
<p>Returns <c>true</c> on success, or <c>false</c> if <c>term</c> is
not a handle to a resource object of type <c>type</c>.</p>
+ <p><c>enif_get_resource</c> does not add a reference to the resource
+ object. However, the pointer received in <c>*objp</c> is guaranteed to
+ be valid at least as long as the resource handle <c>term</c> is valid.</p>
</desc>
</func>
@@ -2947,6 +2950,10 @@ enif_map_iterator_destroy(env, &amp;iter);</code>
References made by <seealso marker="#enif_make_resource">
<c>enif_make_resource</c></seealso>
can only be removed by the garbage collector.</p>
+ <p>There are no guarantees exactly when the destructor of an
+ unreferenced resource is called. It could be called directly by
+ <c>enif_release_resource</c> but it could also be scheduled to be
+ called at a later time possibly by another thread.</p>
</desc>
</func>