title: COM object that has been separated from its underlying RCW cannot be used
body: <p>I have some COM component which I call from some c# dll.</p>
  
  <p>I also have a winforms app that uses that .dll.</p>
  
  <p>When I close the app I get this exception:</p>
  
  <blockquote>
    <p>COM object that has been separated
    from its underlying RCW cannot be
    used.</p>
  </blockquote>
  
  <p>The stack trace shows this exception comes from a destructor in the .dll. I implemented this destructor to call some cleanup method in the COM.</p>
  
  <p>Why does this happen? How is it best to solve it?</p>