$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [asio] Removing server socket from service
From: michi7x7 (mailing-lists_at_[hidden])
Date: 2010-11-03 15:18:12
Am 03.11.2010 20:04, schrieb Frank Mori Hess:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Wednesday 03 November 2010, michi7x7 wrote:
>> shared_ptr<client> client = new client(); //you will have to
>> construct this prior to this (to get the soccet for accept())
>> client->set_close_signal(signal_close_.connect(&client::close, client);
> Since you are binding a copy of the shared_ptr<client> into the slot, I
> don't see how the client could ever get destructed while the connection is
> still alive.
Oh damn,
of course you are right. I meant to use the raw-pointer there:
client->set_close_signal(signal_close_.connect(&client::close,
get_pointer(client));
Regards,
michi7x7