Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>No.</p> <p>As professionals, the question we should not be asking ourselves is, "Is it ever OK to do this?" but rather "Is there ever a <em>good</em> reason to do this?" And "hunting down that memory leak is a pain" isn't a good reason.</p> <p>I like to keep things simple. And the simple rule is that my program should have no memory leaks.</p> <p>That makes my life simple, too. If I detect a memory leak, I eliminate it, rather than run through some elaborate decision tree structure to determine whether it's an "acceptable" memory leak.</p> <p>It's similar to compiler warnings – will the warning be fatal to my particular application? Maybe not. </p> <p>But it's ultimately a matter of professional discipline. Tolerating compiler warnings and tolerating memory leaks is a bad habit that will ultimately bite me in the rear.</p> <p>To take things to an extreme, would it ever be acceptable for a surgeon to leave some piece of operating equipment inside a patient?</p> <p>Although it is possible that a circumstance could arise where the cost/risk of removing that piece of equipment exceeds the cost/risk of leaving it in, and there could be circumstances where it was harmless, if I saw this question posted on SurgeonOverflow.com and saw any answer other than "no," it would seriously undermine my confidence in the medical profession.</p> <p>–</p> <p>If a third party library forced this situation on me, it would lead me to seriously suspect the overall quality of the library in question. It would be as if I test drove a car and found a couple loose washers and nuts in one of the cupholders – it may not be a big deal in itself, but it portrays a lack of commitment to quality, so I would consider alternatives.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload