摘要: / *ObjectPool.h */#include <iostream>#include <queue>#include <vector>template <typename T>class ObjectPool{public: ObjectPool(size_t chunk_size = kdefault_size); ~ObjectPool(); T& acquire_object(); void release_object(T& obj);protected: void allocate_chunk(); static 阅读全文
posted @ 2013-03-16 14:58 good90 阅读(2940) 评论(0) 推荐(1) 编辑