Fix memory leak in TTreeFormula