
3 Nov
2010
3 Nov
'10
7:04 p.m.
-----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-----