Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
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.