Does *every* Excel interop object need to be released using Marshal.ReleaseComObject?

后端 未结 3 1556
谎友^
谎友^ 2020-12-05 04:23

Edit

Please see also How do I properly clean up Excel interop objects?. I recently came across this question, and it provided a lot of insight into

3条回答
  •  既然无缘
    2020-12-05 05:16

    You should call Marshal.ReleaseComObject on every COM object you use in your code, not just the main application object.

提交回复
热议问题