如何正确退出应用程序 [英] How to exit an application properly
本文介绍了如何正确退出应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
通常,我只是使用 Environment.Exit(code)
来退出应用程序。 (通常通过按钮点击。)但我想知道它是退出的正确方式,即释放内存等等。
解决方案
Usually, I will just use Environment.Exit(code)
to exit an application. (Usually through a button click.) But I would like to know is it the proper way to exit, ie, releasing memory etc etc...
解决方案
Just Close()
all active/existing forms and the application should exit.
这篇关于如何正确退出应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文