Skip to content

Commit

Permalink
fix(tier4_planning_rviz_plugin): memory leak (autowarefoundation#7164) (
Browse files Browse the repository at this point in the history
autowarefoundation#1507)

fix memory leak

Signed-off-by: Yukihito Saito <[email protected]>
Co-authored-by: Yukihiro Saito <[email protected]>
  • Loading branch information
0x126 and yukkysaito authored Sep 4, 2024
1 parent cd1e5db commit 9d91137
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@ class AutowarePathBaseDisplay : public rviz_common::MessageFilterDisplay<T>
node->detachAllObjects();
node->removeAndDestroyAllChildren();
this->scene_manager_->destroySceneNode(node);

rviz_rendering::MovableText * text = velocity_texts_.at(i);
delete text;
}
velocity_texts_.resize(msg_ptr->points.size());
velocity_text_nodes_.resize(msg_ptr->points.size());
Expand All @@ -338,6 +341,9 @@ class AutowarePathBaseDisplay : public rviz_common::MessageFilterDisplay<T>
node->detachAllObjects();
node->removeAndDestroyAllChildren();
this->scene_manager_->destroySceneNode(node);

rviz_rendering::MovableText * text = slope_texts_.at(i);
delete text;
}
slope_texts_.resize(msg_ptr->points.size());
slope_text_nodes_.resize(msg_ptr->points.size());
Expand Down

0 comments on commit 9d91137

Please sign in to comment.