1
#include "../NKernel.h"
3
#include "NMemoryHook.h"
7
INL_IMPLEMENT_GLOBAL_OBJECT(MemHook)
9
// Singleton constructor
10
void MemHook::Constructor()
12
// The first hook will point to our default hook...
13
m_pRootHook = &m_DefaultHook;
16
// Singleton destructor
17
void MemHook::Destructor()
19
// Check if all object that has hooked unregistered like they should...
20
nuxAssert(m_pRootHook == &m_DefaultHook);
23
void MemoryHook::Hook()
26
m_pNextHook = INL_GLOBAL_OBJECT_INSTANCE(MemHook).Hook(this);
29
void MemoryHook::UnHook()
32
INL_GLOBAL_OBJECT_INSTANCE(MemHook).UnHook(this, m_pNextHook);