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
fix memory leak

Signed-off-by: Yukihito Saito <yukky.saito@gmail.com>
  • Loading branch information
yukkysaito authored and a-maumau committed Jun 7, 2024
1 parent a3bcd69 commit ba11217
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,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 @@ -339,6 +342,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 ba11217

Please sign in to comment.