GPUBuffer: destroy() method
Khả dụng hạn chế
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Note: This feature is available in Web Workers.
Phương thức destroy() của giao diện GPUBuffer hủy GPUBuffer.
Cú pháp
js
destroy()
Tham số
Không có.
Giá trị trả về
None (Undefined).
Ví dụ
js
const output = device.createBuffer({
size: 1000,
usage: GPUBufferUsage.STORAGE | GPUBufferUsage.COPY_SRC,
});
// some time later
output.destroy();
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| WebGPU> # dom-gpubuffer-destroy> |