Best Way to Release Excel Interop com Object

前端 未结 5 793
不知归路
不知归路 2020-12-11 12:48

Experts, Please let me know the best way I can do this...

I am working on a VB.Net application that uses the Microsoft.Office.Interop.Excel Object Library to create

5条回答
  •  有刺的猬
    2020-12-11 13:17

    Don't search and call release manually. The Interop process could still run loose if the application crashes catastrophically.

    I would register the Interop process to the OS via Job Objects.

    Here is a solution: https://stackoverflow.com/a/1307180/160146

提交回复
热议问题