Boost logo

Boost Users :

From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2008-07-22 14:08:29


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 22 July 2008 11:57 am, Igor R wrote:
> ...by the way, in the document of the thread_safe_signals the
> following example appears:
>
> // ...
> boost::shared_ptr<NewsMessageArea> newsMessageArea(new
> NewsMessageArea(/* ... */));
> // ...
> deliverNews.connect(signal_type::slot_type(&NewsMessageArea::displayNews,
> newsMessageArea, _1).track(newsMessageArea));
>
> I.e., the slot is both tracked *and* bound as shared_ptr.
> But if it's bound as a shared_ptr, it will never expire, so the
> tracking is useless here, isn't it? Or am I miss something?

Yes, you're right, thanks for reporting that. I've added a .get() so it binds
a raw pointer.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIhiIe5vihyNWuA4URAvHNAKC2rk+WWJNFGsj/+GWw868HNeXDfwCeMbue
gz4qD5xekSL1pp+W2esIDE0=
=NSev
-----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