iw4x-client/src/Utils/Memory.hpp

18 lines
327 B
C++
Raw Normal View History

2016-01-12 19:08:26 +01:00
namespace Utils
{
class Memory
{
public:
static void* Allocate(size_t length);
template <typename T> static T* AllocateArray(size_t count)
{
return (T*)Allocate(count * sizeof(T));
}
static char* DuplicateString(std::string string);
static void Free(void* data);
static void Free(const void* data);
};
}