title: Can a memory block allocated by using operator new/malloc persist beyond end of program execution?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2213627/when-you-exit-a-c-application-is-the-malloc-ed-memory-automatically-freed">When you exit a C application, is the malloc-ed memory automatically freed?</a>  </p>
  </blockquote>
  
  
  
  <p>This question came to my mind when i was reading about how compulsory it is to use delete/free respectively when it comes to dynamic memory allocation in C/C++. I thought if the memory allocation persisted beyond the termination of my program execution, then yes it is compulsory; otherwise, why do i have to worry about freeing up the allocated space? Isn't the OS going to free it up automatically with process termination? How right am i?
  My question is that can</p>
  
  <pre><code>int *ip = new int(8);
  </code></pre>
  
  <p>persist beyond the termination of my program?</p>