Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Dispose

Disposes a NativeArray<T>.
Read time 1 minuteLast updated 6 days ago

Definition

Dispose()

Disposes a NativeArray<T>.
public void Dispose()

Remarks

This methods disposes the memory owned by a NativeArray<T>. The behavior of this methods depends on the Allocator used when the NativeArray was created.

Dispose(JobHandle)

Creates and schedules a job that releases all resources (memory and safety handles) of a NativeArray<T>.
public JobHandle Dispose(JobHandle inputDeps)

Parameters

inputDeps

The dependency of the new job.

Returns

Type

Description

JobHandleThe JobHandle] of the new job. The job depends upon
inputDeps
and releases all resources (memory and safety handles) of the NativeArray<T>.