Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


DeallocateOnJobCompletionAttribute

Automatically deallocates a native container when a job is finished.
Read time 3 minutesLast updated 9 days ago

Definition

[AttributeUsage(AttributeTargets.Field)]public sealed class DeallocateOnJobCompletionAttribute : 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.

Inheritance

Inherited Members