Skip to content

Commit

Permalink
fix leaking of object urls
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Aug 15, 2023
1 parent d4b3ee0 commit afffc08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/graph/graphviz-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit afffc08

Please sign in to comment.