From 2eec73639498102c4cc5260d1429f6ba3e24cd2a Mon Sep 17 00:00:00 2001 From: sagudev <16504129+sagudev@users.noreply.github.com> Date: Sat, 24 Oct 2026 14:08:24 +0200 Subject: [PATCH] [deno] Do poll after Device::destroy to call Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --- deno_webgpu/device.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deno_webgpu/device.rs b/deno_webgpu/device.rs index 78e8f1c2f..ce0d9306e 100644 --- a/deno_webgpu/device.rs +++ b/deno_webgpu/device.rs @@ -148,6 +148,9 @@ impl GPUDevice { #[undefined] fn destroy(&self) { self.wgpu_device.destroy(); + // Poll the device to encourage it to process any pending operations + // and release resources associated with the destroyed device (and thus calling lost closure). + let _ = self.wgpu_device.poll(wgpu_types::PollType::Poll); } #[reentrant]