title: How can I detected memory leak's in Linux/MacOs platform?
body: <p>I have prepare header file "heap_monitor.h". This header work that, if I include this on some other header file, its check me any memory leak in this header and cpp file. 
  When i forget delete objects in destructor, they stay in heap and this monitor send me error, an I know where i don't delokate memory in heap.</p>
  
  <pre><code>#pragma once
  #define _CRTDBG_MAP_ALLOC
  #include &lt;stdlib.h&gt;
  #include &lt;crtdbg.h&gt;
  
  #define new new ( _NORMAL_BLOCK , __FILE__ , __LINE__ )
  
  #define initHeapMonitor() _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF)
  </code></pre>
  
  <p>this version of code including crtdbg.h which is Windows library.
  In Xcode is code I don't compile with this error:</p>
  
  <p><strong>ERROR:</strong> 'crtdbg.h' file not found</p>
  
  <p>I must wrote some other code to check this memory leaks or something to fix the program to compile my work without this.</p>
  
  <p>when I delete crtdbg.h x code send me 20 errors in new.cpp:
  <a href="https://prnt.sc/iv1x7d" rel="nofollow noreferrer">https://prnt.sc/iv1x7d</a></p>
  
  <p>Know someone how I fix this problem ? </p>