Version: 2022.2
public void Dispose ();

描述

处置 NativeArray。

此方法处理 NativeArray 拥有的内存。此方法的行为取决于创建它时使用的分配策略(请参阅:Allocator)。


public Unity.Jobs.JobHandle Dispose (Unity.Jobs.JobHandle inputDeps);

参数

inputDeps The dependency for the new job.

返回

JobHandle The handle of the new job. The job depends upon `inputDeps` and releases all resources (memory and safety handles) of this NativeArray.

描述

处置 NativeArray。

Creates and schedules a job that releases all resources (memory and safety handles) of this NativeArray.