fixed memory leak

This commit is contained in:
Robert Haschke 2018-01-08 14:55:48 +01:00
parent 32314d3532
commit 70fadbef11

View File

@ -147,6 +147,10 @@ TaskListModel::~TaskListModel() {
ROS_DEBUG_NAMED(LOGNAME, "destroying TaskListModel: %p", this);
// inform MetaTaskListModel that we will remove our stuff
removeRows(0, rowCount());
// free RemoteTaskModels
for (auto& pair : remote_tasks_) {
if (pair.second) delete pair.second;
}
}
void TaskListModel::setScene(const planning_scene::PlanningSceneConstPtr &scene)