3#include "MTObjectPool.hpp"
15 static typename MTObjectPool<t_Type>::Ptr s_Pool;
32 template <
typename t_Type>
35 if constexpr (std::is_pointer_v<t_Type>)
37 using t_ExtractedType =
typename std::remove_pointer<t_Type>::type;
38 return new t_ExtractedType();
46 if constexpr (std::is_pointer_v<t_Type>)
Provides a static implementation of Pool.ObjectPool_1.
static void Release(t_Type &p_Element)
Release an element.
static t_Type Get()
Simple get.
void Release(t_Type &p_Element) override
Release an element.
t_Type Get() override
Simple get.
static Ptr Make(_v::CFuncRef< t_Type > createFunc, _v::CActionRef< t_Type & > actionOnGet=nullptr, _v::CActionRef< t_Type & > actionOnRelease=nullptr, _v::CActionRef< t_Type & > actionOnDestroy=nullptr, bool collectionCheck=true, int defaultCapacity=10, int maxSize=100)
Constructor.
Memory management & pools utilities.