终结器中的异常 [英] exception in finalizers

查看:109
本文介绍了终结器中的异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果终结器发生异常,应用程序将终止吗?否则将发生什么情况

if a exception occurs in the finalizers will the application terminate? or what will happen

推荐答案

如果Finalize或Finalize的覆盖引发异常,则运行时将忽略该异常,终止该Finalize方法,并继续完成终结过程.这直接来自MSDN Object.Finalize方法 [ ^ ]

希望对您有帮助
If Finalize or an override of Finalize throws an exception, the runtime ignores the exception, terminates that Finalize method, and continues the finalization process. This comes direct from MSDN Object.Finalize Method[^]

Hope this helps


这篇关于终结器中的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆