uli
12/14/2022, 9:43 AMrefTo
.
I am passing a ByteArray reference by calling bytes.refTo to POSIX read
and now wonder when the pinning will be undone? I see that the CValuesRef
returned by getPointer
takes an AutofreeScope
.
Where does that come from? And when is it cleared?
I.e. what is the lifetime of a CValuesRef
returned by refTo
?Dominaezzz
12/15/2022, 10:40 AMuli
12/15/2022, 11:49 AMhandleError(write(fd, buffer.refTo(0), 255))
getPointer
when it sees a CValueRef being passed? And the compiler also creates the AutofreeScope enclosing the c-interop-callDominaezzz
12/15/2022, 12:06 PMDominaezzz
12/15/2022, 12:08 PMuli
12/15/2022, 1:09 PM