Boost logo

Boost Users :

Subject: Re: [Boost-users] [signals2] scoped_connection strangeness
From: liamv7 (liamv7_at_[hidden])
Date: 2010-06-25 19:16:45


On 26 June 2010 00:30, Frank Mori Hess <frank.hess_at_[hidden]> wrote:
>
> On Friday 25 June 2010, liamv7 wrote:
>> I'm using the signals2 library in the arrangement shown below.
>> Connections are using the scoped_connection class. When I call
>> Disconnect on an instant of X I expect that it won't be referenced
>> anymore (by the signaller object.) But it generally doesn't seem to be
>> the case. For the object "a" it is correctly destructed but "b" isn't
>> destructed until the signaller object is destructed. I am using
>> signals2 correctly?
>
> Disconnect only flags the slot as disconnected, it doesn't immediately destroy
> the slot object.  Slots are cleaned up incrementally during signal
> invocations and connects.  I suppose I should add a FAQ entry about this.
>

Thanks for the info, Frank.
The signals (1st version) seems to behave as I want -- destructing on
disconnect. So I will try using that.


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