| 524 | TensorPool pool = TensorPool(this); |
| 525 | KernelPool kernelPool = KernelPool(this); |
| 526 | ~Context() { |
| 527 | LOG(kDefLog, kTrace, "Destroying context"); |
| 528 | if (queue) { |
| 529 | wgpuQueueRelease(queue); |
| 530 | } else { |
| 531 | LOG(kDefLog, kWarn, "Queue is null"); |
| 532 | } |
| 533 | if (device) { |
| 534 | wgpuDeviceRelease(device); |
| 535 | processEvents(instance); |
| 536 | } else { |
| 537 | LOG(kDefLog, kWarn, "Device is null"); |
| 538 | } |
| 539 | if (adapter) { |
| 540 | wgpuAdapterRelease(adapter); |
| 541 | processEvents(instance); |
| 542 | } else { |
| 543 | LOG(kDefLog, kWarn, "Adapter is null"); |
| 544 | } |
| 545 | if (instance) { |
| 546 | wgpuInstanceRelease(instance); |
| 547 | } else { |
| 548 | LOG(kDefLog, kWarn, "Instance is null"); |
| 549 | } |
| 550 | LOG(kDefLog, kInfo, "Context destroyed"); |
| 551 | } |
| 552 | }; |
| 553 | |
| 554 | /** |
nothing calls this directly
no test coverage detected