Description
The Three.js/WebGL renderer is initialized when the 3D viewer component mounts but is not properly disposed when the component unmounts. This leaves GPU resources and WebGL contexts allocated, causing memory leaks.
Impact
- Memory leak with every navigation away and back to the viewer
- Browser may run out of WebGL contexts after repeated navigation
Suggested Fix
Implement proper cleanup in the component's componentWillUnmount / useEffect cleanup — dispose the renderer, scene, and geometries.
Description
The Three.js/WebGL renderer is initialized when the 3D viewer component mounts but is not properly disposed when the component unmounts. This leaves GPU resources and WebGL contexts allocated, causing memory leaks.
Impact
Suggested Fix
Implement proper cleanup in the component's
componentWillUnmount/useEffectcleanup — dispose the renderer, scene, and geometries.