Function SpanExtensions.MoveToUnsafeSpan

MoveToUnsafeSpan<T> (this NativeArray<T> arr)

Moves a NativeArray to a span.

Public Static
UnsafeSpan<T> MoveToUnsafeSpan<T> (

this NativeArray<T>

arr

)

Moves a NativeArray to a span.

This transfers ownership of the memory to the UnsafeSpan, without any copying. The span must be disposed using UnsafeSpan.Free when you are done with it. The native array cannot be used after this operation, and must not be disposed.