Fixed missing Leaks.cpp in 2D/3D modules

Former-commit-id: 2e059122d2ef7500638037ecec45af8fd66c5f3a
This commit is contained in:
Lynix 2013-03-06 12:57:15 +01:00
parent 9b7a0ff4d7
commit 62afc9d5dc
3 changed files with 58 additions and 5 deletions

5
.gitignore vendored
View File

@ -10,7 +10,6 @@
*.project
# Nazara build
examples/bin/*.exe
lib/libNazara*.a
lib/Nazara*.dll
@ -48,10 +47,6 @@ $RECYCLE.BIN/
*.user
*.sln.docstates
# Build results
[Dd]ebug*/
[Rr]elease/
[Tt]est[Rr]esult
[Bb]uild[Ll]og.*

View File

@ -0,0 +1,29 @@
// Copyright (C) 2012 Jérôme Leclercq
// This file is part of the "Nazara Engine - 2D Module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/2D/Config.hpp>
#if NAZARA_2D_MEMORYLEAKTRACKER || defined(NAZARA_DEBUG)
#include <Nazara/Core/Debug/MemoryLeakTracker.hpp>
#include <new>
void* operator new(std::size_t size)
{
return NzMemoryManager::Allocate(size, false);
}
void* operator new[](std::size_t size)
{
return NzMemoryManager::Allocate(size, true);
}
void operator delete(void* pointer) noexcept
{
NzMemoryManager::Free(pointer, false);
}
void operator delete[](void* pointer) noexcept
{
NzMemoryManager::Free(pointer, true);
}
#endif

View File

@ -0,0 +1,29 @@
// Copyright (C) 2012 Jérôme Leclercq
// This file is part of the "Nazara Engine - 3D Module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/3D/Config.hpp>
#if NAZARA_3D_MEMORYLEAKTRACKER || defined(NAZARA_DEBUG)
#include <Nazara/Core/Debug/MemoryLeakTracker.hpp>
#include <new>
void* operator new(std::size_t size)
{
return NzMemoryManager::Allocate(size, false);
}
void* operator new[](std::size_t size)
{
return NzMemoryManager::Allocate(size, true);
}
void operator delete(void* pointer) noexcept
{
NzMemoryManager::Free(pointer, false);
}
void operator delete[](void* pointer) noexcept
{
NzMemoryManager::Free(pointer, true);
}
#endif