title: Is it ever OK to *not* use free() on allocated memory?
body: <p>I'm studying computer engineering, and I have some electronics courses. I heard, from two of my professors (of these courses) that it is possible to avoid using the <code>free()</code> function (after <code>malloc()</code>, <code>calloc()</code>, etc.) because the memory spaces allocated likely won't be used again to allocate other memory. That is, for example, if you allocate 4 bytes and then release them you will have 4 bytes of space that likely won't be allocated again: you will have a <em>hole</em>.</p>
  
  <p>I think that's crazy: you can't have a <em>not-toy-program</em> where you allocate memory on the heap without releasing it. But I don't have the knowledge to explain exactly why it's so important that for each <code>malloc()</code> there must be a <code>free()</code>.</p>
  
  <p>So: are there ever circumstances in which it might be appropriate to use a <code>malloc()</code> without using <code>free()</code>? And if not, how can I explain this to my professors?</p>