Hi, I'm using the signal library in my application. However if I call disconnect() on my connection object the connection is not removed. Is this default behaviour? I would like not having this behaviour because the signal is connected to a member function within an object that is actually deleted. Any ideas? Regards, Christian
On Jun 5, 2007, at 6:54 AM, Christian Mol wrote:
I'm using the signal library in my application. However if I call disconnect() on my connection object the connection is not removed. Is this default behaviour? I would like not having this behaviour because the signal is connected to a member function within an object that is actually deleted. Any ideas?
That's strange. Calling disconnect() on a connection object will disconnect the signal from the slot, so that the slot will not be invoked. The connection itself will be deallocated when it is safe to do so. If this isn't the behavior you are seeing, it might be a bug in Signals. - Doug
Sorry, The trouble I experienced was a programming error on my side. The disconnect method works as expected. Chris Douglas Gregor wrote:
On Jun 5, 2007, at 6:54 AM, Christian Mol wrote:
I'm using the signal library in my application. However if I call disconnect() on my connection object the connection is not removed. Is this default behaviour? I would like not having this behaviour because the signal is connected to a member function within an object that is actually deleted. Any ideas?
That's strange. Calling disconnect() on a connection object will disconnect the signal from the slot, so that the slot will not be invoked. The connection itself will be deallocated when it is safe to do so. If this isn't the behavior you are seeing, it might be a bug in Signals.
- Doug
participants (2)
-
Christian Mol
-
Douglas Gregor