DeallocateOnJobCompletionAttribute
Automatically deallocates a native container when a job is finished.
읽는 시간 3분최근 업데이트: 한 달 전
Definition
- Type: Class
- Namespace: Unity.Collections
- Assembly: UnityEngine.CoreModule
- Inherits from: Attribute
- Implements: _Attribute
[AttributeUsage(AttributeTargets.Field)]public sealed class DeallocateOnJobCompletionAttribute : Attribute, _Attribute
Remarks
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