vega/react-vega

react vega leaks memory

domoritz opened this issue · 6 comments

In

we only finalize the view but we need to call finalize from the embed result.

ndobb commented

@kristw is this the issuing causing #200?

In our app's usage of react-vega we'll potentially be mounting and unmounting the <Vega/> component frequently, so a fix (or guidance on how to fix ourselves) would be great.

The fix should be pretty straightforward. Instead of calling finalize on the view, we should call it on the result from Vega-Embed. We do this in https://github.com/vega/svelte-vega now. It would be awesome if you could send a pull request.

ndobb commented

Happy to take a stab at a fix, and thanks for the pointer to svelte-vega.

ndobb commented

@domoritz please see PR at #403.

published react-vega@7.4.4

Thank you @kristw!