Method AllocateNativeArray
AllocateNativeArray<T>(Int32)
Allocate a NativeArray of type T from memory that is guaranteed to remain valid until the Scratchpad
allocator is Rewound (under user control). There is no contention for this memory between threads.
There is no need to Dispose the NativeArray so allocated. It is not possible
to free the memory by Disposing it - it is automatically freed when the Scratchpad is Rewound.
Declaration
[BurstCompatible(GenericTypeArguments = new Type[]{typeof(int)})]
public NativeArray<T> AllocateNativeArray<T>(int length)
where T : struct
Parameters
Type |
Name |
Description |
Int32 |
length |
|
Returns
Type Parameters