Function UnsafeSpan.MoveToNativeArray

MoveToNativeArray (Allocator allocator)

Moves this data to a new NativeArray.

Public
unsafe NativeArray<T> MoveToNativeArray (

Allocator

allocator

)

Moves this data to a new NativeArray.

This transfers ownership of the memory to the NativeArray, without any copying. The NativeArray must be disposed when you are done with it.

Warning

This span must have been allocated using the specified allocator.