
30 Dec
2008
30 Dec
'08
10:28 a.m.
Is it possible to use a shared_ptr object in a signal? I want something like struct A{ ... void operator()(){ ... } ... }; typedef boost::signal<void()> Signal; Signal mySignal; boost::shared_ptr<A> a( new A() ); mySignal.connect(a); The trouble seems to be getting the signal to dereference the pointer when the callback is made... Any tips? James