here is my code, should I directly usage vector<IndexVector> ?
std::vector<std::unique_ptr<IndexVector>> ret; // IndexVector is a protobuf message type, sizeof ... = 72
while (result.next()) {
std::unique_ptr<IndexVector> indexVector {std::make_unique<IndexVector>()};
int64_t poiId = result.getLLong(1);
int64_t pictureId = result.getLLong(2);
bool isDel = result.getInt(3) != 0;
indexVector->set_id(pictureId);
indexVector->set_poiid(poiId);
indexVector->set_isdel(isDel);
ret.push_back(indexVector);
}
return ret;