MDN self-hosted library · e01.org

GPUBuffer: destroy() method

WebGPU API

WebGPU API

The destroy() method of the GPUBuffer interface destroys the GPUBuffer.

Syntax

destroy()

Parameters

None.

Return value

None (undefined).

Examples

const output = device.createBuffer({
  size: 1000,
  usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_SRC,
});

// some time later

output.destroy();

Specifications

Browser compatibility

See also