Memory exhaust while writing and reading a simple tree

Sorry, I submit twice, but where to delete it