Leak when reading std::vector

Hi Wiso,

Note that the semantic of:std::vector<float>* v = nullptr; tree->SetBranchAddress("vector", &v, &bvpx);is that the TTree will allocate the object but the caller (your code) is the owner of the vector.
So to avoid the leak you ought to do: tree->GetEntry(0); tree->ResetBranchAddresses(); // TTree forgets about 'v' and (in this case) does not delete the vector. delete v;

Cheers,
Philippe.