Memory leak?

1. A concise explanation of the problem you're experiencing.
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.

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
Sandcastle example:

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
We are trying to dynamically add and remove objects from an Entity, or assign things such as SampledPositionProperties, however the process of doing this causes listeners to build up.

4. The Cesium version you're using, your operating system and browser.

1.36, OSX 10.12. Chrome 60

Hello,

Thanks for reporting this and creating the Sandcastle example! I opened an issue in the cesium repo here: https://github.com/AnalyticalGraphicsInc/cesium/issues/5757

I included your report and example, please add comments there if you have any additional information.

Thanks!

Gabby