Firefox Tomorrow

web api instance method

GPUBuffer: destroy() method

View on MDN ↗

Secure contextAvailable in workers

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

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also