ol-cesium icon indicating copy to clipboard operation
ol-cesium copied to clipboard

What is the proper way to destroy an instance of ol-cesium?

Open dandoteverest opened this issue 7 years ago • 1 comments

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.

dandoteverest avatar Jul 25 '18 15:07 dandoteverest

You are right, having a destroy method on the OLCesium instance would be great. Would you be able to propose a PR implementing this?

gberaudo avatar Aug 02 '18 14:08 gberaudo

Any plans for releasing this? We're also running into memory leaks.

matthias-ccri avatar Jul 05 '23 20:07 matthias-ccri

OK @matthias-ccri, will organize to do a release soon.

gberaudo avatar Jul 17 '23 11:07 gberaudo