I'm considering using boost::function
in my implementation of a timer manager. At schedule timer a boost::function
will be passed and at the timer expiration the callback will be executed. Times will be scheduled/canceled at a vey high frequency (~1000 actions/sec).
But I'm concerned regarding the amount of heap memory boost::function
may use.
I know for example that boost::asio
uses boost::function
a lot, while performance requirements for the library are probably very high.
What do you think?