c++ memory leak detection ideas

cmemleak traces malloc() and free()

http://www.flipcode.com/archives/How_To_Find_Memory_Leaks.shtml is a dated (2000) but readable and detailed treatment

Three easy ways to use GlowCode: (1) use it to launch your application, (2) attach GlowCode to a running program, or (3) link GlowCode directly into your application. No source code or build change or post-build step required.

VisualStudio offers
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); // I guess there’s no such thing in Linux