From afffc08fe56fcaa979839f680ed579c7a11d9914 Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Tue, 15 Aug 2023 01:45:17 +0300 Subject: [PATCH] fix leaking of object urls --- src/graph/graphviz-worker.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/graph/graphviz-worker.ts b/src/graph/graphviz-worker.ts index 9314a6da..5ef5101d 100644 --- a/src/graph/graphviz-worker.ts +++ b/src/graph/graphviz-worker.ts @@ -22,8 +22,9 @@ export class VizWorker { type: 'application/javascript', }); const url = URL.createObjectURL(blob); - this._worker = new Worker(url, { name: 'graphql-voyager-worker' }); + URL.revokeObjectURL(url); + this._worker.addEventListener('message', (event) => { const { id, result } = event.data as RenderResponse;