Skip to content

Commit 4d57453

Browse files
authored
fix(VideoTexture): adding dispose (#2123)
1 parent c586258 commit 4d57453

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/VideoTexture.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -109,5 +109,9 @@ export const VideoTexture = ({
109109
} & Parameters<typeof useVideoTexture>[1]) => {
110110
const ret = useVideoTexture(src, config)
111111

112+
useEffect(() => {
113+
return () => void ret.dispose()
114+
}, [ret])
115+
112116
return <>{children?.(ret)}</>
113117
}

0 commit comments

Comments
 (0)