Skip to content

Commit 036cc10

Browse files
committed
weird fix?
1 parent d3203e3 commit 036cc10

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

deep_core/include/deep_core/deep_node_base.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class DeepNodeBase : public rclcpp_lifecycle::LifecycleNode
5656
/**
5757
* @brief Destructor
5858
*/
59-
virtual ~DeepNodeBase() = default;
59+
virtual ~DeepNodeBase();
6060

6161
protected:
6262
/**

deep_core/src/deep_node_base.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ DeepNodeBase::DeepNodeBase(const std::string & node_name, const rclcpp::NodeOpti
3535
add_on_set_parameters_callback(std::bind(&DeepNodeBase::on_parameter_change, this, std::placeholders::_1));
3636
}
3737

38+
DeepNodeBase::~DeepNodeBase()
39+
{
40+
// Remove parameter callback to prevent callback invocation during destruction
41+
if (parameter_callback_handle_) {
42+
remove_on_set_parameters_callback(parameter_callback_handle_.get());
43+
}
44+
}
45+
3846
void DeepNodeBase::declare_parameters()
3947
{
4048
declare_parameter("Backend.plugin", "");

0 commit comments

Comments
 (0)