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 <[email protected]>
  • Loading branch information
yukkysaito authored and shmpwk committed May 30, 2024
1 parent 1d0e185 commit d54286f
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 d54286f

Please sign in to comment.