Skip to content
Snippets Groups Projects
Commit 51adfd08 authored by ferrari's avatar ferrari
Browse files

fix imu_data memory leak

parent 3e5e16f5
Branches HighBlueRec
No related tags found
2 merge requests!2HighBlueParser dev branch merged to empty main branch,!1High blue rec
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
......@@ -176,7 +176,7 @@ void JasonRecorder::get_samples(std::vector<std::uint8_t> &samples, std::vector<
else if ((((std::uint16_t) buffer[1] << 8 )|(buffer[2])) == DATA_ID) {
// find the beginning and length of the samples in the buffer
size_t start = this->additional_data_size + 6;
imu_data.resize(0);
imu_data.reserve(this->additional_data_size);
imu_data.insert(imu_data.begin(), &buffer[6], &buffer[start]);
size_t num_samples = (received - start);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment