[Miwi-middleware] RFC: NetworkContext opaque object

Dmitri Rubinstein rubinstein at cs.uni-saarland.de
Thu May 15 12:34:06 CEST 2014


On 05/15/14 09:08, Mathias Hablützel wrote:
> On Wed, May 14, 2014 at 05:00:21PM +0000, Dmitri Rubinstein wrote:
>> Why io_service_ is a shared_ptr ? Boost::asio does not support this.
>> NetworkContext should be shared IMHO, and all classes that use it should
>> store shared pointer to it. Then there is a guarantee that encapsulated
>> boost::asio::io_service will stay as long as users of  NetworkContext do
>> exist.
>
> Is it possible to enforce this? So that you only can use this object
> via a boost::shared_ptr?


No, you can always use an object without boost:shared_ptr since there is 
a shared_ptr::get method.

Best,

Dmitri

>
>
>
> _______________________________________________
> Miwi-middleware mailing list
> Miwi-middleware at lists.fi-ware.org
> https://lists.fi-ware.org/listinfo/miwi-middleware
>




More information about the Miwi-middleware mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy