title: Are memory leaks ever ok?
body: <p>Is it ever acceptable to have a <a href="http://en.wikipedia.org/wiki/Memory_leak" rel="noreferrer">memory leak</a> in your C or C++ application?</p>
  
  <p>What if you allocate some memory and use it until the very last line of code in your application (for example, a global object's destructor)? As long as the memory consumption doesn't grow over time, is it OK to trust the OS to free your memory for you when your application terminates (on Windows, Mac, and Linux)? Would you even consider this a real memory leak if the memory was being used continuously until it was freed by the OS.</p>
  
  <p>What if a third party library forced this situation on you? Would refuse to use that third party library no matter how great it otherwise might be?</p>
  
  <p>I only see one practical disadvantage, and that is that these benign leaks will show up with memory leak detection tools as false positives.</p>