Hello,
I would like to get the memory leaks information using _CRTDBG_MAP_ALLOC, and especially the files and line numbers, but I don't get them at the end. I only get something like this:
{130} normal block at 0x00695128, 16 bytes long. Data: <\ E Pi > 5C A5 45 01 02 00 00 00 01 00 00 00 E8 50 69 00
I've seen that this should be before all the includes:
#define _CRTDBG_MAP_ALLOC
#include <cstdlib>
#include <crtdbg.h>
And some people recommend to add this after all the includes in all the sources files:
#ifdef _DEBUG
#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#define new DEBUG_NEW
#endif
HOWEVER, in the main.cpp, if I explicitly add a memory leak, it appears with the line number in my output! So it works, but not for everything...
As I use the Boost librairies, I suspect that the memory leaks all happen somewhere in these... (shared_ptr ?). But how to know where these memory leaks come from then?