Destroys devices created by init and releases their cached pipelines and buffers.
Call when done (required in Node.js to prevent crash on exit).
With no argument, releases every device at once. Pass a device to release
just that one and leave the others usable — handy when driving several GPUs.
Unknown or already-released devices are ignored, so this is safe to call
more than once.
import { init, cleanup, gpuName } from"wgblas";
awaitinit(); console.log("GPU:", gpuName().description); if (typeofprocess !== "undefined") cleanup(); // Node.js only — browser cleanup is automatic
Parameters
Optionaldevice: GPUDevice
the device to release; omit to release all of them.
Destroys devices created by init and releases their cached pipelines and buffers. Call when done (required in Node.js to prevent crash on exit).
With no argument, releases every device at once. Pass a device to release just that one and leave the others usable — handy when driving several GPUs. Unknown or already-released devices are ignored, so this is safe to call more than once.