Added memory helpers

This will protect some memory-related code from new redefinition


Former-commit-id: 337e69e70acd0bf8dbc3ba1657c6bb0bddfd5df4
This commit is contained in:
Lynix
2014-07-22 17:26:31 +02:00
parent fba2e5ae01
commit e6dea541a7
7 changed files with 79 additions and 28 deletions

View File

@@ -5,12 +5,12 @@
#include <Nazara/Core/Config.hpp>
#if NAZARA_CORE_MANAGE_MEMORY
#define NAZARA_DEBUG_NEWREDEFINITION_DISABLE_REDEFINITION
#include <Nazara/Core/Debug/NewRedefinition.hpp>
#include <Nazara/Core/MemoryManager.hpp>
#include <new> // Nécessaire ?
#define NAZARA_DEBUG_NEWREDEFINITION_DISABLE_REDEFINITION
#include <Nazara/Core/Debug/NewRedefinition.hpp>
void* operator new(std::size_t size, const char* file, unsigned int line)
{
return NzMemoryManager::Allocate(size, false, file, line);