Clear references to let the tree destroy

Clear circular references from the tree to allow it destroy after it's rendered