Skip to content

Commit c51a72e

Browse files
committed
Revert accidental deletion of allocator creation.
Signed-off-by: Steve Wolter <[email protected]>
1 parent af20431 commit c51a72e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

rclcpp/src/rclcpp/node_interfaces/node_parameters.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ NodeParameters::NodeParameters(
6060
// TODO(wjwwood): expose this allocator through the Parameter interface.
6161
rclcpp::PublisherOptionsWithAllocator<AllocatorT> publisher_options(
6262
parameter_event_publisher_options);
63+
publisher_options.allocator = std::make_shared<AllocatorT>();
6364

6465
if (start_parameter_services) {
6566
parameter_service_ = std::make_shared<ParameterService>(node_base, node_services, this);

rclcpp/test/rclcpp/test_subscription.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ TEST_F(TestSubscription, various_creation_signatures) {
247247
}
248248
{
249249
rclcpp::SubscriptionOptionsWithAllocator<std::allocator<void>> options;
250+
options.allocator = std::make_shared<std::allocator<void>>();
250251
EXPECT_NE(nullptr, options.get_allocator());
251252
auto sub = rclcpp::create_subscription<Empty>(
252253
node, "topic", 42, cb, options);

0 commit comments

Comments
 (0)