v10: R3F-created WebGPURenderer is not disposed on unmount

Author: tonyblu331Created Sep 23, 2026Updated Sep 23, 2026

Bug

In v10 24d1f81, R3F creates and initializes a WebGPURenderer for a single <Canvas renderer={{}} />. Its unmount path cleans up the scene and events but never calls renderer.dispose().

Reproduction

On unmodified v10, spy on the R3F-created renderer's dispose(), unmount the single Canvas, and advance the 500 ms cleanup timer. The lifecycle test observes zero calls. This verifies the missing call, not a measured GPU-memory leak.

Expected

Dispose an R3F-created renderer once its last canvas consumer is gone. Preserve caller-owned renderers and active secondary canvases.

Source: pmndrs/react-three-fiber