Skip to content

Conversation

@stevewolter
Copy link

@stevewolter stevewolter commented Oct 26, 2020

This removes one more user of the broken generic version of
get_rcl_allocator, which is causing
ros2/rclcpp#1254. This is a companion change to ros2/rclcpp#1324.

While there, fix the copy constructor for tslf_heap_allocator. Right now, the allocator keeps an owning ref to a memory pool, and the copy constructor makes a shallow copy of the reference. The first copy of the allocator to go out of scope will invalidate all copies. Instead, use a shared_ptr so that the last copy will clean up the memory pool.

Signed-off-by: Steve Wolter [email protected]

This removes one more user of the broken generic version of
get_rcl_allocator, which is causing
ros2/rclcpp#1254.

Signed-off-by: Steve Wolter <[email protected]>
@audrow audrow changed the base branch from master to rolling June 28, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants