diff --git a/examples/Example.h b/examples/Example.h index 34749e8a..49a7835b 100644 --- a/examples/Example.h +++ b/examples/Example.h @@ -425,6 +425,8 @@ struct WgWindow : Window virtual ~WgWindow() { + //the canvas is tightly relying on the wgpu resource. cut out before rleasing them for safety. + static_cast(canvas)->target(nullptr, nullptr, nullptr, 0, 0); wgpuSurfaceRelease(surface); wgpuInstanceRelease(instance); }