Skip to content

Commit

Permalink
Fix memory leak by finalizing Vega view on cleanup (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmmease authored Sep 21, 2023
1 parent ddb7ebe commit 3cc963b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vl-convert-rs/src/converter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function vegaToSvg(vgSpec) {
const baseURL = 'https://vega.github.io/vega-datasets/';
const loader = vega.loader({ mode: 'http', baseURL });
let view = new vega.View(runtime, {renderer: 'none', loader});
let svgPromise = view.toSVG();
let svgPromise = view.toSVG().finally(() => { view.finalize() });
return svgPromise
}
"#;
Expand Down

0 comments on commit 3cc963b

Please sign in to comment.