title: Shared_ptr and unique_ptr with exception
body: <p>From <a href="http://en.cppreference.com/w/cpp/memory/unique_ptr" rel="nofollow noreferrer">en.cppreference.com</a></p>
  <blockquote>
  <p>Typical uses of std::unique_ptr include:</p>
  <ul>
  <li><p>providing exception safety to
  classes and functions that handle objects with dynamic lifetime, by
  guaranteeing deletion on both normal exit and exit through exception</p>
  </li>
  <li><p>passing ownership of uniquely-owned objects with dynamic lifetime into
  functions</p>
  </li>
  <li><p>acquiring ownership of uniquely-owned objects with dynamic lifetime
  from functions</p>
  </li>
  <li><p>as the element type in move-aware containers, such as std::vector,
  which hold pointers to dynamically-allocated objects (e.g. if
  polymorphic behavior is desired)</p>
  </li>
  </ul>
  </blockquote>
  <p>I am interested in the first point.</p>
  <p>It is not mentioned for <code>shared_ptr</code> in cppreference.com.
  I am not able to find a scenario where the shared_ptr doesn't get deleted when an exception is thrown. Could someone please explain  if there exists such possibilities ?</p>