fix memory leak.
This commit is contained in:
parent
cdbf8bee6e
commit
abb04dc397
@ -59,7 +59,7 @@ int SensorScheduler::WriteScheduleCfg(long &ts, std::string &world_time) {
|
|||||||
for (int i = 0; i < available_slice_; ++i) {
|
for (int i = 0; i < available_slice_; ++i) {
|
||||||
ids.append(slice_allocation[i]);
|
ids.append(slice_allocation[i]);
|
||||||
}
|
}
|
||||||
delete slice_allocation;
|
delete []slice_allocation;
|
||||||
root["id"] = ids;
|
root["id"] = ids;
|
||||||
Json::StyledStreamWriter streamWriter;
|
Json::StyledStreamWriter streamWriter;
|
||||||
std::ofstream out_file(SCHEDULE_CONFIG);
|
std::ofstream out_file(SCHEDULE_CONFIG);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user