title: Example of memory leak in c++ (by use of exceptions)
body: <p>In C<a href="https://rads.stackoverflow.com/amzn/click/com/0132662361" rel="nofollow noreferrer" rel="nofollow noreferrer">++ How to program</a> there is a paragraph that say:</p>
  
  <blockquote>
    <p>A common programming practice is to allocate dynamic memory, assign the address of
    that memory to a pointer, use the pointer to manipulate the memory and deallocate the
    memory with delete when the memory is no longer needed. If an exception occurs after
    successful memory allocation but before the delete statement executes, a memory leak
    could occur. The C++ standard provides class template unique_ptr in header  to
    deal with this situation.</p>
  </blockquote>
  
  <p>Any on could introduce me a real example that exception occur and memory will leak <a href="https://stackoverflow.com/questions/7242493/how-to-create-a-memory-leak-in-c">like this post</a>?</p>