title: COM object created by CComObject::CreateInstance not destroyed when pointer goes out of scope
body: <p>Using smart pointer <code>CComObject</code> I create a COM object by calling its static method <code>CreateInstance</code>. But when I leave my program, at least in VS13, that object remains running. Here is my code:</p>
  
  <pre><code>CComObject&lt; CMyAtlObject &gt; * myAtlCOMObject = NULL;
  HRESULT hr = CComObject&lt; CMyAtlObject &gt;::CreateInstance(&amp;myAtlCOMObject);
  ASSERT(SUCCEEDED(hr));
  </code></pre>
  
  <p>I expected the <code>~CComObject()</code> method to be called when going out of scope which does not happen.</p>
  
  <p>I tried putting the code above in curly braces to force the newly created object to go out scope.
  I tried calling <code>FinalRelease</code> on <code>myAtlCOMObject</code> and succeeded in manually calling <code>Release</code> on <code>myAtlCOMObject</code>, but the program still didn't stop running in VS13.</p>
  
  <p>What am I missing?</p>