title: shared_ptr release
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1525764/how-to-release-pointer-from-boostshared-ptr">How to release pointer from boost::shared_ptr?</a><br>
    <a href="https://stackoverflow.com/questions/1833356/detach-a-pointer-from-a-shared-ptr">Detach a pointer from a shared_ptr?</a>  </p>
  </blockquote>
  
  
  
  <p>I'm attempting to release a shared_ptr (the way you can release a unique_ptr). I know this doesn't make sense when the shared_ptr isn't unique, but I have a shared_ptr which is guaranteed to be unique. I've tried...</p>
  
  <pre><code>m_pObj.reset((T*)nullptr, [](T* const){});
  </code></pre>
  
  <p>...but it just deletes the object anyway. I'm not sure what that deleter argument is good for if shared_ptr winds up calling delete anyway.</p>
  
  <p>Is there any way to achieve this (solutions specific to VS2010 are welcome if there is no other way).</p>