When context loss follows repeated SPA navigation, inspect resource and renderer lifecycles. Removing an object from a scene does not automatically release all its geometry, materials and textures. However, a context lost event alone does not prove a memory leak. 13
Repeat one navigation loop
Enter the 3D view, leave it and repeat several times. Check whether renderers, event listeners or animation loops accumulate. renderer.info helps track resource counts; it is not an exact total-GPU-memory meter. 1
Clean up by ownership
Stop the departing view’s rendering loop and remove its own listeners. Dispose of resources that are no longer used. Textures need separate attention: disposing of a material does not dispose of every texture it references. 12
Do not blindly release shared resources that the next view still needs. Decide whether the renderer belongs to the entire application or to one view, and make that ownership explicit.
Plan a failure state
Handle webglcontextlost where appropriate and provide a meaningful fallback. Restoration needs deliberate application support; the visitor should not be left staring at an unexplained blank canvas. 3
If resource counts stabilize across repeated visits, investigate device and driver behavior too. Avoid labelling every context loss as a Three.js defect or a confirmed memory leak without the evidence to distinguish them.
Related reading
How this 3D portfolio is built · Separate pixel cost from lifecycle problems