Famous / engine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FamousEngine->removeScene does not recursively remove all child and grandchild nodes

arunabhdas opened this issue · comments

It is expected that removeScene would do a depth-first search and remove all child and grandchild nodes but it doesn't seem to do this. The child and grandchild nodes continue to remain.

I'm running into the same issue when doing dismount() on my root node and then try to mount new nodes.

It basically boils down to this:

var aTreeWithNodes = createTree();
famousScene.addChild(aTreeWithNodes);
aTreeWithNodes.dismount();
famousScene.addChild(createTree()); //add a fresh set of nodes -> BAM

I'm getting an error in the PathStore. Seems like the memo is correctly cleared, but according to the paths array all the children of the rootNode are still there.

Doing a manual recursive depth-first dismount() solves the issue for me.