cleanup empties the hash but does not remove the tree root, as this is removed in the destructor.