Version: 2022.3

NativeContainerSupportsDeallocateOnJobCompletionAttribute

class in Unity.Collections.LowLevel.Unsafe

切换到手册

描述

Indicates that a native container can be automatically deallocated.

Apply this attribute to native container types that you want to automatically deallocate with DeallocateOnJobCompletionAttribute. The native container must contain two fields: One named m_Buffer (of a pointer type) and one named m_AllocatorLabel (of type Allocator). The job system uses the values of these two fields to automatically deallocate the native container on job completion. See Also: DeallocateOnJobCompletionAttribute