I recently needed to have a pool of objects and it would make everyones life a lot easier if those objects would automatically return themselves to the pool when they were done.
Here's my take on a shared pointer pool.
I recently needed to have a pool of objects and it would make everyones life a lot easier if those objects would automatically return themselves to the pool when they were done.
Here's my take on a shared pointer pool.
I've finally gotten around to uploading a little project I did years ago. any_config
is a template class that implements a somewhat fancy prototype pattern.
Read about at github.com.
I'm not sure how else to name this entry, it's rather complicated. So what I was finally able to achieve is to pass a boost::bind
to a boost::bind
with placeholders, with templated callbacks. I'm not gonna lie, this took me awhile to figure out.
The rationale for all of this was that I had a parent class called group
, and this group had the list of boost::asio::deadline_timer
's and the boost::asio::io_service
running in a thread. I wanted the ability for child objects to put work in that thread.