html文本编辑控件的窗体上,退出时,报错,在开发环境中,项目直接中断退出

发现是这句话造成的

     IntPtr ptr = Marshal.GetIDispatchForObject(this.theSite);
                        int i = Marshal.Release(ptr);
                        while (i > 0)
                        {
                            i = Marshal.Release(ptr);
                        }

没有找到原因

直接try 了

   try
                    {
                        IntPtr ptr = Marshal.GetIDispatchForObject(this.theSite);
                        int i = Marshal.Release(ptr);
                        while (i > 0)
                        {
                            i = Marshal.Release(ptr);
                        }
                    }
                    catch { }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2021-10-18
  • 2022-02-01
  • 2022-12-23
  • 2021-10-04
猜你喜欢
  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2021-11-10
  • 2022-12-23
相关资源
相似解决方案