destroy method

void destroy()

The destroy() method of the GPUDevice interface destroys the device, preventing further operations on it.

Note that:

  • Any commands currently enqueued on the device's GPUQueue will be executed before the device is destroyed.
  • Any WebGPU resources created using the device (buffers, textures, etc.) are also destroyed.
  • Any mapped buffers created using the device will be unmapped.

Implementation

external void destroy();