From 210e36f43085e10cd8e0f26cadfcf7807a97088a Mon Sep 17 00:00:00 2001 From: modeco80 Date: Thu, 12 Sep 2024 13:11:12 -0400 Subject: [PATCH] cvmts: fix memory leak javascript blows chunks --- cvmts/src/CollabVMServer.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cvmts/src/CollabVMServer.ts b/cvmts/src/CollabVMServer.ts index d9ec4e8..bb6ce1a 100644 --- a/cvmts/src/CollabVMServer.ts +++ b/cvmts/src/CollabVMServer.ts @@ -890,7 +890,9 @@ export default class CollabVMServer { for (let rect of self.rectQueue) promises.push(doRect(rect)); - this.rectQueue = []; + // javascript is a very solidly designed language with no holes + // or usability traps inside of it whatsoever + this.rectQueue.length = 0; await Promise.all(promises); }