Simple resource pool for recycling resources in C++