modeld: delete wide_frame in model_free (#25562)

pull/25573/head
Dean Lee 3 years ago committed by GitHub
parent 715eabf733
commit 68b1dbc0ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      selfdrive/modeld/models/driving.cc
  2. 4
      selfdrive/modeld/models/driving.h

@ -97,6 +97,7 @@ ModelOutput* model_eval_frame(ModelState* s, VisionBuf* buf, VisionBuf* wbuf,
void model_free(ModelState* s) {
delete s->frame;
delete s->wide_frame;
}
void fill_lead(cereal::ModelDataV2::LeadDataV3::Builder lead, const ModelOutputLeads &leads, int t_idx, float prob_t) {

@ -253,8 +253,8 @@ constexpr int NET_OUTPUT_SIZE = OUTPUT_SIZE + TEMPORAL_SIZE;
// TODO: convert remaining arrays to std::array and update model runners
struct ModelState {
ModelFrame *frame;
ModelFrame *wide_frame;
ModelFrame *frame = nullptr;
ModelFrame *wide_frame = nullptr;
std::array<float, NET_OUTPUT_SIZE> output = {};
std::unique_ptr<RunModel> m;
#ifdef DESIRE

Loading…
Cancel
Save