CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.98k stars 3.5k forks source link

Event listeners are not being removed when an entity is destroyed #5757

Open ggetz opened 7 years ago

ggetz commented 7 years ago

Adding entities (or any kind of Cesium object with a definitionChanged object) to an Entity as a non-standard key causes a listener to be added to it, and not removed.

Here's a Sandcastle example showing the issue: https://cesiumjs.org/Cesium/Apps/Sandcastle/?src=Hello%20World.html&label=Showcases&gist=f0bbec7cd261365aaadd3bb991c4261c

Reported on the forum here: https://groups.google.com/forum/#!topic/cesium-dev/bRk7kmcApeo

ggetz commented 7 years ago

Related to #5827