Fix custom models and fix some memory leaks nta had
This commit is contained in:
@ -27,6 +27,7 @@ namespace Utils
|
||||
{
|
||||
if (data)
|
||||
{
|
||||
OutputDebugStringA(Utils::String::VA("Free: %X\n", (DWORD)data));
|
||||
free(data);
|
||||
}
|
||||
}
|
||||
@ -36,6 +37,19 @@ namespace Utils
|
||||
Memory::Free(const_cast<void*>(data));
|
||||
}
|
||||
|
||||
void Memory::FreeAlign(void* data)
|
||||
{
|
||||
if (data)
|
||||
{
|
||||
_aligned_free(data);
|
||||
}
|
||||
}
|
||||
|
||||
void Memory::FreeAlign(const void* data)
|
||||
{
|
||||
Memory::FreeAlign(const_cast<void*>(data));
|
||||
}
|
||||
|
||||
// Complementary function for memset, which checks if memory is filled with a char
|
||||
bool Memory::IsSet(void* mem, char chr, size_t length)
|
||||
{
|
||||
|
@ -108,6 +108,9 @@ namespace Utils
|
||||
static void Free(void* data);
|
||||
static void Free(const void* data);
|
||||
|
||||
static void FreeAlign(void* data);
|
||||
static void FreeAlign(const void* data);
|
||||
|
||||
static bool IsSet(void* mem, char chr, size_t length);
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user