Boost logo

Boost :

From: graham.shanks_at_[hidden]
Date: 2002-10-14 18:53:15


Doug Gregor wrote:
>On Mon, 14 Oct 2002 graham.shanks_at_[hidden] wrote:
>[snip example]
>> The solution to get the expected (by me) behaviour is to use
>> boost::bind, i.e.
>>
>> sig.connect(boost::bind(&EventCounter::operator(), &eventCounter));
>
>You might also consider deriving EventCounter from
>boost::signals::trackable or using boost::signals::scoped_connection, so
>that the Signals reference to eventCounter doesn't outlive the
>eventCounter object.

I was trying to keep the example simple. However I'm definately using
boost::signals::scoped_connection regularly. I need to play a bit more with
boost::signals::trackable to work out how I want to use this in my code.

Graham Shanks


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk