title: Clean up Excel Interop Objects with IDisposable
body: <p>In my company the common way to release Excel Interop Objects is to use <code>IDisposable</code> the following way:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Public Sub Dispose() Implements IDisposable.Dispose
      If Not bolDisposed Then
          Finalize()
          System.GC.SuppressFinalize(Me)
      End If
  End Sub
  
  Protected Overrides Sub Finalize()
      _xlApp = Nothing
      bolDisposed = True
      MyBase.Finalize()
  End Sub
  </code></pre>
  
  <p>where <code>_xlApp</code> was created in the constructor the following way:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Try
      _xlApp = CType(GetObject(, "Excel.Application"), Excel.Application)
  Catch e As Exception
      _xlApp = CType(CreateObject("Excel.Application"), Excel.Application) 
  End Try
  </code></pre>
  
  <p>And the client uses the <code>using-statement</code> to execute code concerning excel interop objects.</p>
  
  <p>We completely avoid to use the <a href="http://www.siddharthrout.com/2012/08/06/vb-net-two-dot-rule-when-working-with-office-applications-2/" rel="noreferrer">two dot rule</a>. Now I started researching how to release (Excel) Interop Objects and almost all discussions I found about it like <a href="https://stackoverflow.com/questions/158706/how-to-properly-clean-up-excel-interop-objects">How to properly clean up excel interop objects</a> or <a href="http://www.codeproject.com/Articles/9328/Release-Excel-Object" rel="noreferrer">Release Excel Objects</a> are using mostly <code>Marshal.ReleaseComObject()</code>, none of them using the <code>IDisposable</code> interface. </p>
  
  <p>My questions is: Are there any disadvantages using the <code>IDisposable</code> interace for releasing excel interop objects? If so, what are these disadvantages.</p>