* Dispose context.
()
| 480 | * Dispose context. |
| 481 | */ |
| 482 | dispose() { |
| 483 | this.flushCommands(); |
| 484 | this.canvasRenderManager?.dispose(); |
| 485 | this.bufferTableFreeId = []; |
| 486 | while (this.bufferTable.length != 0) { |
| 487 | this.bufferTable.pop()?.destroy(); |
| 488 | } |
| 489 | for (const buf of this.uniformBufferPool) { |
| 490 | buf.destroy(); |
| 491 | } |
| 492 | this.uniformBufferPool.length = 0; |
| 493 | this.uniformBufferPoolSizes.length = 0; |
| 494 | while (this.readStagingBufferPool.length != 0) { |
| 495 | this.readStagingBufferPool.pop()?.buffer.destroy(); |
| 496 | } |
| 497 | this.device.destroy(); |
| 498 | } |
| 499 | |
| 500 | |
| 501 | /** |
nothing calls this directly
no test coverage detected