Suspicious shared_ptr
Closed this issue · 1 comments
versatran01 commented
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 commented
A plain pointer should be sufficient since it'll have the same scope as the object here.