Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix memory leak in StFstClusterMaker (star-bnl#593)
Memory leaks were found by Gene in issue star-bnl#590. There are 3 places causing the leak in `StFstClusterMaker/StFstScanRadiusClusterAlgo.cxx`: 1. Pointers assigned to std::vector in `line 55` were not deleted before calling std::vector::pop_back() in `line 69` and `line 80`. 2. Object created in `line 140` but only conditionally assigned to a std::vector in `line 148`. 3. In `line 203`, std::vector::erase() was called without deleting the pointers. After fixing these places, there is no memory leak from StFstClusterMaker reported by valgrind. --------- Co-authored-by: Dmitri Smirnov <[email protected]> Co-authored-by: Te-Chuan Huang <[email protected]>
- Loading branch information