You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@fujitatomoya - I noticed that the Windows build had some test failures, and while looking into that, I noticed that there were some similar issues to this introduced as part of #2303. Would it make sense to incorporate the following changes as part of this issue?
auto ros_msg_ptr = std::make_shared<ROSMessageType>();
- auto ros_msg_ptr = std::make_shared<ROSMessageType>();+ auto ros_msg_ptr = std::allocate_shared<ROSMessageType, ROSMessageTypeAllocator>(ros_message_type_allocator_);
Bug report
Required Info:
Steps to reproduce issue
Create a publisher using an adapted type and a custom allocator
Expected behavior
The ROS message that is created by
Publisher::publish()
will be allocated using the provided allocator.Actual behavior
The ROS message is allocated using
std::make_unique<ROSMessageType>()
Additional information
Rather than using
std::make_unique<ROSMessageType>()
, thecreate_ros_message_unique_ptr()
can be used instead in the following two locations:rclcpp/rclcpp/include/rclcpp/publisher.hpp
Line 323 in f9c4894
rclcpp/rclcpp/include/rclcpp/publisher.hpp
Line 370 in f9c4894
The text was updated successfully, but these errors were encountered: