On Sat, Oct 19, 2013 at 5:46 PM, ustulation <ustulation@gmail.com> wrote:

The ptrB destructor is never called because signals2::connection::disconnect
does not seem to wipe out the given slot so the shared_ptr reference of B
remains with the signal in class A as anonymous functor (due to lambda in
<3> above) containing it does not get destroyed.

The signal does destroy the slot eventually, though not immediately in the disconnect call as you have noted.  There is a ticket to change this behavior, as people seem to find it surprising: https://svn.boost.org/trac/boost/ticket/8533
 
--
Frank