title: Can I destroy a class instance even if there are still references?
body: <p>For debugging reasons I want to destroy a class instance which still as references. Is that possible? It doesn't have to be elegant or stable, because this'll never end up in production code.</p>
  
  <p>To clarify:</p>
  
  <pre><code>Public Sub Main
      Dim o as MyClass
      Set o = New MyClass //o is created, one reference
      DestroyObject o     //Class_Terminate is called and the object destroyed
      //Further code, not using o
  End Sub                 //Possible runtime error here (don't care)
  </code></pre>
  
  <p>Is that possible? One way would be to call <code>IUnknown::Release</code> to manually decrease the reference count, but how do I now how often I must call it?</p>