// Memwatch memory leak/overwrite/underwrite/double-free // detector. // // Modified for use with Visual C++ by Stephen Edwards, // 1/24/97. Please report problems under Visual C++ to // edwards@cs.vt.edu. // // To use: // + Add memwatch.cpp to your C++ project. // + Add '#include "Memwatch.h"' to all .cpp files. // + Examine the log file "memwatch.log" in the // current directory after running the program. // #ifndef MEMWATCH_H #define MEMWATCH_H #include #if defined(_MSC_VER) && defined(_DEBUG) void* operator new (size_t Size , int block_type , const char* fname , int lnum ); #define new new(0, __FILE__, __LINE__) #endif // _MSC_VER #endif // MEMWATCH_H