Version: 2022.2

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


Did you find this page useful? Please give it a rating: