📄 objectpool.h
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -