Boost logo

Boost Users :

Subject: Re: [Boost-users] Mixing signals2 and asio mechanism failing
From: Frank Mori Hess (fmh6jj_at_[hidden])
Date: 2013-10-19 19:44:02

On Sat, Oct 19, 2013 at 5:46 PM, ustulation <ustulation_at_[hidden]> 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:


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at