Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] Removing server socket from service
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2010-11-03 15:04:06


-----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);

> The scoped_connection is used to disconnect the close-signal on
> client-destruction (obvious, I think..)

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.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkzRsicACgkQ5vihyNWuA4XpggCgy7ZZi45s6dHaDR9xbncJTqo/
ncMAn0uh4n4b54hNGdkVFRQkbQGYA2Li
=MFrS
-----END PGP SIGNATURE-----


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net