
On 26 June 2010 00:30, Frank Mori Hess
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.