Use shared pointer when binding callback for serial read (#38)

* Resolves an issue with ROS Melodic on 18.04.
This commit is contained in:
Yutaka Kondo 2019-08-20 02:32:00 +09:00 committed by Jacob Perron
parent 070550e655
commit 2442ba209c
2 changed files with 4 additions and 3 deletions

View file

@ -40,13 +40,14 @@ POSSIBILITY OF SUCH DAMAGE.
#include <boost/thread/condition_variable.hpp>
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include "create/data.h"
#include "create/types.h"
#include "create/util.h"
namespace create {
class Serial {
class Serial : public boost::enable_shared_from_this<Serial> {
protected:
boost::asio::io_service io;