If the user doesn't retain a reference to the returned shared pointer there will be zero references and their callback will be unregistered. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
This commit is contained in:
parent
6ea67a4e9f
commit
ce5de8757d
3 changed files with 9 additions and 0 deletions
|
@ -42,6 +42,8 @@
|
|||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "rcutils/macros.h"
|
||||
|
||||
#include "rcl/error_handling.h"
|
||||
#include "rcl/node.h"
|
||||
|
||||
|
@ -456,6 +458,7 @@ public:
|
|||
* \sa rclcpp::Node::add_on_set_parameters_callback
|
||||
*/
|
||||
RCLCPP_LIFECYCLE_PUBLIC
|
||||
RCUTILS_WARN_UNUSED
|
||||
rclcpp_lifecycle::LifecycleNode::OnSetParametersCallbackHandle::SharedPtr
|
||||
add_on_set_parameters_callback(
|
||||
rclcpp_lifecycle::LifecycleNode::OnParametersSetCallbackType callback);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue