Add object pool
This commit is contained in:
19
engine/breeze/utils/object_pool.h
Normal file
19
engine/breeze/utils/object_pool.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef BREEZE_OBJECT_POOL_H
|
||||
#define BREEZE_OBJECT_POOL_H
|
||||
|
||||
#include "../defines.h"
|
||||
|
||||
typedef struct BzObjectPool BzObjectPool;
|
||||
|
||||
typedef struct BzObjectPoolDesc {
|
||||
size_t objectSize;
|
||||
size_t numObjects;
|
||||
} BzObjectPoolDesc;
|
||||
|
||||
BzObjectPool *bzObjectPoolCreate(const BzObjectPoolDesc *desc);
|
||||
void bzObjectPoolDestroy(BzObjectPool *pool);
|
||||
|
||||
void *bzObjectPool(BzObjectPool *pool);
|
||||
void bzObjectPoolRelease(BzObjectPool *pool, void *object);
|
||||
|
||||
#endif //BREEZE_OBJECT_POOL_H
|
||||
Reference in New Issue
Block a user