From 8a837eaada0b6b725bde26017b5c599aff312516 Mon Sep 17 00:00:00 2001 From: Michael Wang Date: Tue, 14 Jan 2025 15:52:07 +0800 Subject: [PATCH] fix: destroy ydoc after persisting to prevent memory leaks --- src/api.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api.js b/src/api.js index c629b41..aaffa7a 100644 --- a/src/api.js +++ b/src/api.js @@ -317,6 +317,8 @@ export class Api { } catch (e) { console.error(e) } + // destroy ydoc after persisting + ydoc.destroy() } })) return tasks