关闭表单时应用程序不会停止 [英] App don't stop when closing the form

查看:88
本文介绍了关闭表单时应用程序不会停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的应用程序不会停止,我点击表格。我的意思是,表单是关闭的,但是进程在任务管理器中继续运行。所以我认为

有内存泄漏或某些对象的进程在某些时候停滞不前。

有一个简单的方法可以知道它来自哪里而不是断点

遍及整个代码? ''因为它'很大,我必须设置断点为

至少一两天


谢谢

Hi,
My app does not stop whan I click on the form. I mean, the form is
closing, but the process keeps running in the task manager. So I figured
there are memory leaks or some object''s process stuck at some point. Is
there an easy way to know where it comes from other than putting breakpoints
all over the code? ''cause it''s huge and I would have to set breakpoints for
at least a day or two

thanks

推荐答案

显然你在创建和销毁对象时有错误的方法

实例。

对于所有已实现IDisposable的对象,我建议你打电话给

obj.Dispose并将它设置为obj = Nothing(或null)当你不需要他时

更多。

....也有可能你没有退出一些循环!?


问候,

Josip Habjan

网址: http://www.habjansoftware.com



" ThunderMusic" < NO ******* @ sympatico.caSPAMATALL>在消息中写道

新闻:OS ************* @ TK2MSFTNGP12.phx.gbl ...
Obviously you have wrong approach on creating and destroying objects
instances.
For all objects that have implemented IDisposable, i suggest you to call
obj.Dispose and set it to obj = Nothing (or null) when you dont need him any
more.

.... it is also possible that you did not exit some loop !?

Regards,
Josip Habjan
URL: http://www.habjansoftware.com


"ThunderMusic" <NO*******@sympatico.caSPAMATALL> wrote in message
news:OS*************@TK2MSFTNGP12.phx.gbl...

我的应用程序不会停止,我点击表格。我的意思是,表单正在关闭,但进程在任务管理器中继续运行。所以我认为有内存泄漏或某些对象的进程在某些时候停滞不前。是否有一种简单的方法可以知道它来自哪里而不是在整个代码中放置
断点? 因为它很大,我必须设置断点
至少一两天

感谢
Hi,
My app does not stop whan I click on the form. I mean, the form is
closing, but the process keeps running in the task manager. So I figured
there are memory leaks or some object''s process stuck at some point. Is
there an easy way to know where it comes from other than putting
breakpoints
all over the code? ''cause it''s huge and I would have to set breakpoints
for
at least a day or two

thanks


ThunderMusic,


你一整天或短时间一直在跑步是什么意思?


Cor
ThunderMusic,

What do you mean with keeps running, all day long or a short time?

Cor


Josip,
Josip,
对于已实施IDisposable的所有对象,我建议您致电
obj.Dispose并将其设置为obj = Nothing(或null)当你不再需要他时
时。
For all objects that have implemented IDisposable, i suggest you to call
obj.Dispose and set it to obj = Nothing (or null) when you dont need him
any more.




所有文本框,面板,表格,表格中的组合框和其他控件和数据集

等,它们已经实现了IDisposable吗?


Cor



All textboxes, panels, forms, comboboxes and other controls and datasets
etc, which are on the forms, which have IDisposable implemented?

Cor


这篇关于关闭表单时应用程序不会停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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