diff --git a/src/core/Line.tsx b/src/core/Line.tsx index 14f07969f..232325b24 100644 --- a/src/core/Line.tsx +++ b/src/core/Line.tsx @@ -72,7 +72,10 @@ export const Line: ForwardRefComponent = /* @_ }, [dashed, lineMaterial]) React.useEffect(() => { - return () => lineGeom.dispose() + return () => { + lineGeom.dispose() + lineMaterial.dispose() + } }, [lineGeom]) return (