docs.unity.cn
    Show / Hide Table of Contents

    Method AllocateNativeList

    AllocateNativeList<T>(Int32)

    Allocate a NativeList 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 NativeList 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 NativeList<T> AllocateNativeList<T>(int capacity)
        where T : struct
    Parameters
    Type Name Description
    Int32 capacity
    Returns
    Type Description
    NativeList<T>
    Type Parameters
    Name Description
    T
    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Wednesday, July 6, 2022
    Terms of use