TreeFormatter erase implemented in order to facilitate object reuse