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