That sounds like a reasonable way to do it. Another thing you could do is
that if you know how big the vector will be, you can call
indexVector.reserve() to reserve the correct size, then add each element
with indexVector.emplace_back() and initialize its fields in place. That
would let you use
here is my code, should I directly usage vector ?
std::vector> ret; // IndexVector is a
protobuf message type, sizeof ... = 72
while (result.next()) {
std::unique_ptr indexVector
{std::make_unique()};
int64_t poiId = result.getLLong(1);
int64_t pictureId =