|
Boost : |
Subject: [boost] Should pass boost::asio::io_service by raw pointer or smart pointer?
From: hh h (jupiter.hce_at_[hidden])
Date: 2018-12-20 00:29:59
Hi,
In many examples and even implementations, programmers like to pass
boost::asio::io_service by raw pointer:
MyClass::MyClass(boost::asio::io_service &io_service) :
myRawIoService(io_service) {}
Will this cause issues to pass raw pointer for large size of classes,
should it be replaced by passing smart pointer:
MyClass::MyClass(const std::shared_ptr<boost::asio::io_service>
&io_service) : myIoService(io_service) {}
Thank you.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk