Improve docs for FFI custodian API. (#1684)
Improve docs for FFI custodian API. The docs were unclear on when an object goes from weakly to strongly held. Also add a missing space
This commit is contained in:
parent
f43234e1cb
commit
cd1e56bfaf
|
@ -51,16 +51,18 @@ be remembered until either the custodian shuts it down or
|
||||||
zero, the value is allowed to be garbage collected (and automatically
|
zero, the value is allowed to be garbage collected (and automatically
|
||||||
removed from the custodian).
|
removed from the custodian).
|
||||||
|
|
||||||
Independent of whether @var{strong} is zero, the value @var{o} is
|
Independent of whether @var{strong} is zero, the value @var{o}
|
||||||
initially weakly held. A value associated with a custodian can
|
is initially weakly held and becomes strongly held when
|
||||||
therefore be finalized via will executors.
|
the garbage collector attempts to collect it. A value
|
||||||
|
associated with a custodian can therefore be finalized via
|
||||||
|
will executors.
|
||||||
|
|
||||||
The return value from @cpp{scheme_add_managed} can be used to refer
|
The return value from @cpp{scheme_add_managed} can be used to refer
|
||||||
to the value's custodian later in a call to
|
to the value's custodian later in a call to
|
||||||
@cpp{scheme_remove_managed}. A value can be registered with at
|
@cpp{scheme_remove_managed}. A value can be registered with at
|
||||||
most one custodian.
|
most one custodian.
|
||||||
|
|
||||||
If @var{m} (or the current custodian if @var{m} is @cpp{NULL})is shut
|
If @var{m} (or the current custodian if @var{m} is @cpp{NULL}) is shut
|
||||||
down, then @var{f} is called immediately, and the result is
|
down, then @var{f} is called immediately, and the result is
|
||||||
@cpp{NULL}.}
|
@cpp{NULL}.}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user