mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
fix destruction order
This commit is contained in:
parent
1a4f6c0e57
commit
e9b16ba7c0
@ -99,12 +99,15 @@ Task::createPlanner(const robot_model::RobotModelConstPtr& model, const std::str
|
|||||||
|
|
||||||
Task::~Task()
|
Task::~Task()
|
||||||
{
|
{
|
||||||
reset();
|
clear(); // remove all stages
|
||||||
|
robot_model_.reset();
|
||||||
|
// only destroy loader after all references to the model are gone!
|
||||||
|
robot_model_loader_.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Task::setRobotModel(const core::RobotModelConstPtr& robot_model)
|
void Task::setRobotModel(const core::RobotModelConstPtr& robot_model)
|
||||||
{
|
{
|
||||||
reset();
|
reset(); // solutions, scenes, etc become invalid
|
||||||
robot_model_ = robot_model;
|
robot_model_ = robot_model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user