
On 2/23/07, Frank Mori Hess
Could you give a short example of how that would look with using bind and a simple free function expecting a pointer or reference to an object that should be tracked?
Attached.
From the attached: boost::shared_ptr<coordinate> coord(new coordinate); coord->x = 5; sig.connect(boost::bind(&myfunction, boost::signalslib::track(coord, boost::ref(coord->x))));
Does the track() do magic within bind() such that it really has nothing to do with the signal? ie did you (or can we) build a bridge between weak_ptrs and bind/function, independent from signals? That would be really useful. Makes me start to think some of the work is being done in the wrong place - signals/slots still needs to be threadsafe, but a bind/function that handles lifetime issues would take some of the work away from signals and could be used in a lot more places. Tony