[+] AU_DEBUG_REVERSE_MEMCRUNCH

This commit is contained in:
Reece Wilson 2023-10-21 08:19:27 +01:00
parent bd11c0860d
commit f0aef1f712

View File

@ -25,5 +25,19 @@ namespace Aurora::Debug
}
};
#define AU_DEBUG_MEMCRUNCH Aurora::Debug::MemoryCrunch AU_CONCAT(__crunch, __COUNTER__);
struct MemoryCrunchCallOut
{
inline MemoryCrunchCallOut()
{
DecMemoryCrunch();
}
inline ~MemoryCrunchCallOut()
{
AddMemoryCrunch();
}
};
#define AU_DEBUG_MEMCRUNCH Aurora::Debug::MemoryCrunch AU_CONCAT(__crunch, __COUNTER__);
#define AU_DEBUG_REVERSE_MEMCRUNCH Aurora::Debug::MemoryCrunchCallOut AU_CONCAT(__crunch, __COUNTER__);
}