From 816650a67a6f5f28108c0012024452f5bdb772f3 Mon Sep 17 00:00:00 2001 From: WanSeob Park Date: Tue, 23 Jul 2024 03:47:55 +0900 Subject: [PATCH] fix: dispose line material (#2039) --- src/core/Line.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 (