title: Memory leaks detection while using Boost
body: <p>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:</p>
  
  <blockquote>
    <p>{130} normal block at 0x00695128, 16 bytes long.
     Data: &lt;\ E          Pi > 5C A5 45 01 02 00 00 00 01 00 00 00 E8 50 69 00 </p>
  </blockquote>
  
  <p>I've seen that this should be before all the includes:</p>
  
  <pre><code>#define _CRTDBG_MAP_ALLOC
  #include &lt;cstdlib&gt;
  #include &lt;crtdbg.h&gt;
  </code></pre>
  
  <p>And some people recommend to add this after all the includes in all the sources files:</p>
  
  <pre><code>#ifdef _DEBUG
  #define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
  #define new DEBUG_NEW
  #endif
  </code></pre>
  
  <p>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...</p>
  
  <p>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?</p>