36 std::function<std::shared_ptr<T>(
void)> allocator_function,
37 std::function<
void(std::shared_ptr<T>&)> cleaner_function) :
38 allocator_function_(allocator_function),
39 cleaner_function_(cleaner_function) {}
44 std::function<std::shared_ptr<T>(
void)> allocator_function);
46 void SetCleaner(std::function<
void(std::shared_ptr<T>&)> cleaner_function);
55 int buffer_size_ = 10;
56 std::vector<std::shared_ptr<T>> buffer_;
58 std::atomic_int buffer_index_{0};
60 std::function<std::shared_ptr<T>(
void)> allocator_function_ =
nullptr;
61 std::function<void(std::shared_ptr<T>&)> cleaner_function_ =
nullptr;