xeolabs / scenejs

An extensible WebGL-based 3D engine. This is an archived project.
https://xeolabs.github.io/scenejs/
Other
649 stars 165 forks source link

Fixed child nodes publish memory leak when parent is destroyed #412

Closed zbysiusiekiera closed 8 years ago

zbysiusiekiera commented 8 years ago

This recursively unpublishes child nodes 'nodes/{node id}' topic from the scene node, when their parent is destroyed. Without it, reference to child nodes was kept in scene's topics array, preventing them from being removed by garbage collector.