[<UnverifiableAttribute ()>]
val pin : 'a ref -> ('a nativeptr -> 'b) -> 'b |
Pin the given ref for the duration of a single call to the given function. A native pointer to
the contents of the ref is passed to the given function. Cleanup the GCHandle associated with the
pin when the function completes, even if an exception is raised.
This function should only be used if 'a is a simple blittable type
such as "int" that does not contain any further heap references.
WARNING: use of this function may lead to unverifiable or invalid code
|