I’m working on an application where Cesium viewer is destroyed and created again later in some scenarios. When searching for memory issues I have found that CesiumWidget object is still retaining after the viewer is destroyed via viewer.destroy().
It is reproduced in the simple sandcastle example:
Click Go, wait for several seconds, click Stop, make a heap snapshot. There are multiple CesiumWidget objects are retaining. (Checked via Chrome Dev Tools):
Is this a Cesium issue? Otherwise, could you please hint me if there is a way to re-use CesiumWidget after the viewer was destroyed?