ol-cesium
ol-cesium copied to clipboard
What is the proper way to destroy an instance of ol-cesium?
From what I've found, the proper way to 'destroy' an ol.Map is to call 'setTarget(null)'. Is there an equivalent method for the olcesium instance? Or do I have to get all the individual elements and call 'destroy()' on them (e.g., getCesiumScene().destroy(); getDataSourceDisplay.destroy(); getDataSources().destroy(); etc...)?
We use olcesium in a web-desktop environment, and users routinely open & close different instances. I need to ensure all elements are cleaned up after the window is destroyed.
You are right, having a destroy method on the OLCesium instance would be great. Would you be able to propose a PR implementing this?
Any plans for releasing this? We're also running into memory leaks.
OK @matthias-ccri, will organize to do a release soon.