I looked into the heap use of boost::function before using it too much
further. boost::function is basically a wrapper for either a function
pointer, or a pointer to a functor object. 

In the latter case, boost::function heap allocates a copy-constructed
clone of the functor object when it is constructed, assigned or copied. 
This is a non-issue except on the critical path, so most existing use of
boost::function is fine. 

The exception is the Serializer. I'm removing use of boost function for
execute() tasks and instead making the Serializer a template which can
be instantiated for whatever functor class is needed. The broker::Queue
is using a simple handwritten functor.

Cheers,
Alan.





Reply via email to