title: C++11: How is object deleted if it was constructed using make_shared
body: <p>I am missing something about shared/weak pointers:</p>
  
  <p>When a <code>shared_ptr</code> is constructed using <code>make_shared</code>, only one memory allocation is used (to allocate memory for control block and object itself). What happens when last <code>shared_ptr</code> is destroyed but there are <code>weak_ptr</code>-s left? At this point managed object has to be deallocated. But if memory allocated by <code>make_shared</code> gets deallocated, that would make weak pointers invalid, since same deallocation would destroy control block.</p>