I'm trying to add a cesium instance to a website, but each time the component holding the cesium map loads it creates a new cesium instance without getting rid of the old one. This happens even if I call the .destroy() function or navigate to a component that does not show the map.
If I inspect the memory tab in the chrome dev tools each time I reload the component(without refreshing the page) it adds 30 MB in memory usage and spawns 4 JavaScript VM instances that never go away.
Currently using Vue2 and Vue-Cesium for Vue 2, and lazy loading any routes.
Is there any way to ensure the extra JavaScript VM instances die and the allocated memory gets properly freed? Or should I be storing a single Cesium instance in Vuex?