DeallocateOnJobCompletionAttribute

class in Unity.Collections

/

Implemented in:UnityEngine.CoreModule

Description

Automatically deallocates a native container when a job is finished.

Use this attribute on native container fields marked with NativeContainerSupportsDeallocateOnJobCompletionAttribute in a job struct. In particular, fields of type NativeArray can be automatically deallocated with this attribute. When the job finishes execution, the job system automatically deallocates the native container.

Additional resources: NativeContainerSupportsDeallocateOnJobCompletionAttribute


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