Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

Suspicious shared_ptr #1

Closed
versatran01 opened this issue Oct 8, 2015 · 1 comment
Closed

Suspicious shared_ptr #1

versatran01 opened this issue Oct 8, 2015 · 1 comment

Comments

@versatran01
Copy link
Collaborator

May be I'm wrong, but all those

pub_temp = nh.advertise<sensor_msgs::Temperature>("temperature", 1);
pub_temp_ptr = boost::shared_ptr<ros::Publisher>(&pub_temp);

look very suspicious/dangerous to me.

One workaround is to use a custom null deleter. Or maybe just use plain pointer?

@kartikmohta
Copy link
Collaborator

A plain pointer should be sufficient since it'll have the same scope as the object here.

@ke-sun ke-sun closed this as completed in 4f6c1c1 Oct 8, 2015
kartikmohta pushed a commit that referenced this issue Aug 1, 2018
clalancette added a commit to clalancette/imu_vn_100 that referenced this issue Mar 23, 2020
This allows the user to switch between NED (the default) and
ENU (more useful for ground robots).

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
versatran01 pushed a commit that referenced this issue Mar 30, 2020
This allows the user to switch between NED (the default) and
ENU (more useful for ground robots).

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants