diff --git a/inc/hgl/TypeFunc.h b/inc/hgl/TypeFunc.h index 972ebc9..3035216 100644 --- a/inc/hgl/TypeFunc.h +++ b/inc/hgl/TypeFunc.h @@ -468,6 +468,24 @@ namespace hgl { memset(data,0,sizeof(T)*count); } + + template + inline T *array_alloc(const uint count) + { + return (T *)hgl_malloc(count*sizeof(T)); + } + + template + inline T *array_realloc(T *origin,const uint count) + { + return (T *)hgl_realloc(origin,count*sizeof(T)); + } + + template + inline void array_free(T *items) + { + hgl_free(items); + } }//namespace hgl /**