File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ struct PublisherOptionsWithAllocator : public PublisherOptionsBase
76
76
using MessageAllocatorT = typename AllocatorTraits::template rebind_alloc<MessageT>;
77
77
auto message_alloc = std::make_shared<MessageAllocatorT>(*this ->get_allocator ().get ());
78
78
// TODO(stevewolter): This is likely to invoke undefined behavior - message_alloc goes
79
- // out of scope at the end of this function, but the allocator doesn't.
79
+ // out of scope at the end of this function, but the allocator doesn't. See #1339.
80
80
result.allocator = get_rcl_allocator (*message_alloc);
81
81
result.qos = qos.get_rmw_qos_profile ();
82
82
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ struct SubscriptionOptionsWithAllocator : public SubscriptionOptionsBase
103
103
using MessageAllocatorT = typename AllocatorTraits::template rebind_alloc<MessageT>;
104
104
auto message_alloc = std::make_shared<MessageAllocatorT>(*allocator.get ());
105
105
// TODO(stevewolter): This is likely to invoke undefined behavior - message_alloc
106
- // goes out of scope at the end of this function, but the allocator doesn't.
106
+ // goes out of scope at the end of this function, but the allocator doesn't. See #1339.
107
107
result.allocator = get_rcl_allocator (*message_alloc);
108
108
result.qos = qos.get_rmw_qos_profile ();
109
109
result.rmw_subscription_options .ignore_local_publications = this ->ignore_local_publications ;
You can’t perform that action at this time.
0 commit comments