MemMgr.h and MemMgr.cpp
int main(int, char**)
int* n = new int;
That'll give you debug spew at application shutdown, and write to memleaks.log, then debug break. The debug spew is the same as you get in memleaks.log, and is:
1 active allocations totalling 168 bytes:
+ ID 00000002, tag ID 0x00000000: 0x00356B84 168 bytes [main.cpp:9 (main)]
End of allocations
The code only works on Windows, and should work fine on x64. It's ported from my engine code, but I've just changed a few things (Like the assert doesn't use my engine's assert(), and the _WIN64 define is actually BUILD_X64 in my engine).
It'll also only work on Visual Studio, due to my #pragma black magic. Only tested on VC2005 so far.
Any questions, give me a shout. I'm going to post this in General Programming now. EDIT: Done.