[Home] Type Microsoft.FSharp.Core.Ref


The type of mutable references. Use the functions [:=] and [!] to get and set values of this type.

Full Type Signature

type Ref<'a> = {mutable contents: 'a;}
               with
                 [<UnverifiableAttribute ()>]
                 member Pin : ('a nativeptr -> 'b) -> 'b
                 [<UnverifiableAttribute ()>]
                 member PinHandle : unit -> 'a nativeptr * GCHandle
                 member Value : 'a
                 member Value : 'a with set
               end

Instance Members

MemberDescription
[<UnverifiableAttribute ()>]
member Pin : ('a nativeptr -> 'b) -> 'b
For native interop. Pin the given object for the duration of a single call to the given function. A native pointer to the (0,0) element in the underlying array is passed to the given function. Resources associated with the pin are released when the function completes, even if an exception is raised.
[<UnverifiableAttribute ()>]
member PinHandle : unit -> 'a nativeptr * GCHandle
For native interop. Pin the given object, but the caller is responsible for freeing the GCHandle
member Value : 'a
The current value of the reference cell
member Value : 'a with set
The current value of the reference cell

See Also

Microsoft.FSharp.Core


Documentation for assembly FSharp.Core, version 1.9.4.19, generated using F# version 1.9.4.19