title: Is there a C++/CLI smart pointer project (e.g. scoped_ptr)?
body: <p>Is there a C++/CLI RAII smart pointer class for containment of a native pointer in a managed type?  Just wondering, before I go write my own <code>clr_scoped_ptr</code> value class template.</p>
  
  <p>I'm aware of the Microsoft-provided:</p>
  
  <ul>
  <li><p><a href="http://msdn.microsoft.com/en-us/library/ms177047.aspx" rel="nofollow noreferrer">containment of a managed handle in a native class: <code>auto_gcroot</code></a></p></li>
  <li><p><a href="http://msdn.microsoft.com/en-us/library/ms177066.aspx" rel="nofollow noreferrer">containment of a managed handle in a managed class: <code>auto_handle</code></a></p></li>
  </ul>
  
  <p>The above two are similar to <code>auto_ptr</code> or <code>unique_ptr</code>.</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/3685451/raii-in-c-cli/3686993#3686993">I gave skeleton code for a <code>counted_handle</code> here, similar to <code>shared_ptr</code></a></li>
  </ul>
  
  <p>But all these are for disposing managed ref class instances, not for freeing native objects.</p>