Conversation
Adds arguments and use_global_arguments to NodeBase
|
|
||
| // Create the rcl node and store it in a shared_ptr with a custom destructor. | ||
| rcl_node_t * rcl_node = new rcl_node_t(rcl_get_zero_initialized_node()); | ||
| std::unique_ptr<rcl_node_t> rcl_node(new rcl_node_t(rcl_get_zero_initialized_node())); |
There was a problem hiding this comment.
I changed this only to get rid of false positive "double free" error from cppcheck. It didn't like that it saw two delete rcl_node; statements: one in the error handling after calling rcl_parse_arguments(), and another in the error handling of rcl_node_init().
|
I believe this PR introduced some memory leaks when I ran valgrind on |
* reenable cppcheck Signed-off-by: Karsten Knese <karsten@openrobotics.org> * suppress unknown macro inline Signed-off-by: Karsten Knese <karsten@openrobotics.org>
This adds a parameter for command line arguments to
Node, and a parameter to ignore global CLI arguments. I think roslaunch might need something like this to dynamically compose nodes without their arguments affecting other nodes, though I'm not sure if there is another strategy planned.Kind of related to ros2/examples#200 and ros2/ros2#450