Somewhere in your program (I usually put it right before the program exits), add the line:
_CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
When you run the program (in debug mode), a report will be printed out in the debug window after the program finishes executing.
include file is
Note: I have no idea if this works in other compilers, or environments other than windows 95/98/nt.