Better to change the return type to ```std::unique_ptr<DTSegmentCand>``` since they you
1) make it clear that the caller owns the memory
2) if the caller ignores the return value the object will be deleted properly.