From 0173d7cca8720ca3533bf14b172f72cc00c0b310 Mon Sep 17 00:00:00 2001 From: Maciej Pyrc Date: Fri, 13 Oct 2023 10:45:17 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20fixes=20memory=20leak?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: #426, #419 --- src/components/transform-wrapper/transform-wrapper.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/transform-wrapper/transform-wrapper.tsx b/src/components/transform-wrapper/transform-wrapper.tsx index bdada8af..ac1bf6e4 100644 --- a/src/components/transform-wrapper/transform-wrapper.tsx +++ b/src/components/transform-wrapper/transform-wrapper.tsx @@ -32,6 +32,9 @@ export const TransformWrapper = React.forwardRef( useEffect(() => { instance.update(props); + return () => { + instance.cleanupWindowEvents(); + }; }, [instance, props]); return {content};