You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[[ Foreign Callbacks ]] Bridging and lifetime management.
There is a new LCB type 'foreign handler type'. Handler types marked as foreign will automatically bridge
to C function pointers when used as a parameter type for a foreign handler.
Additionally, the lifetime of C function pointers generated in this way is guaranteed to be the length
of the existance of the instance they are attached to. i.e. When a handler identifier is evaluated, a
handler-ref is cached against the module instance; thus if the handler-ref is subsequently bridged to a
C function ptr, that handler-ref owns the C function ptr. When a module instance is finally destroyed, all
handler-refs and thus any C function pointers they own are then destroyed.
0 commit comments