objectpool.h

来自「C++封装的视频采集代码」· C头文件 代码 · 共 34 行

H
34
字号
#ifndef OBJECT_POOL_H#define OBJECT_POOL_H#include "PoolableObject.h"#include "Utils/CompoundObject.h"namespace oxsemi{    class ObjectPool : public CompoundObject    {    public:        virtual ~ObjectPool() = 0;        /**         * @return A pointer to the allocated object, which will be zero if the         *  allocation request cannot be satisfied.         */        virtual PoolableObject* Allocate() = 0;        /**         * @return A pointer to the allocated object, which will be zero if the         *  allocation request cannot be satisfied.         * @param size A size_t to specifying the size of the object to allocate         */        virtual PoolableObject* Allocate(unsigned long size) = 0;        /**         * @param T* A pointer to a T object allocated via a call to Allocate()         */        virtual void Free(PoolableObject* object) = 0;    };}#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?