I think "tree->Delete(Option_t)" deletes the tree not the branch. Also, try tree->Write(), not br->Write(). Re-using br without deleting the branches is causing a memory leak, so you might try "delete br" to destroy the branch before using br again (don't know if this is kosher), or, better yet, build an array of TBranch* as suggested before by Rene. The latter solution is more elegant and less likely to cause problems.
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:23 MET