进程不会退出 - 帮助 [英] Process Will Not Quit - Help

查看:73
本文介绍了进程不会退出 - 帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用C#编写的Windows可执行文件。它由我们的客户以
三种方式运行:从Windows资源管理器,作为计划任务,或者由

另一个流程启动。

当exe由另一个进程启动时,它完成了它的工作但是

然后永远驻留在内存中的remiains。当它作为任务运行时或由

用户运行时,它就完成并退出内存就好了。

有没有人知道这里可能会发生什么?

I have a Windows executable written in C#. It is run by our customer in
three ways: from Windows Explorer, as a scheduled task, or kicked off by
another process.
When the exe is started by the other process, it completes its work but
then remiains resident in memory forever. When it is run as a task or by the
user, it completes and exits memory just fine.
Does anyone have an idea of what may be going on here?

推荐答案

您应该信任垃圾收集器。它将在调用进程不再引用

对象时释放内存,这意味着当它超出
超出范围时。

Gabriel Lozano-Morán


" Chris Jones" <章******** @ discussions.microsoft.com>在消息中写道

新闻:DC ********************************** @ microsof t.com ...
You should trust the Garbage Collector. It will release the memory when the
object is no longer referenced by the calling process, meaning when it goes
out-of-scope.

Gabriel Lozano-Morán

"Chris Jones" <Ch********@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
我有一个用C#编写的Windows可执行文件。它由我们的客户以三种方式运行:从Windows资源管理器,作为计划任务,或由另一个进程启动。
当exe由另一个进程启动时过程,它完成了它的工作
然后
然后remiains永远驻留在记忆中。当它作为任务运行或由
用户运行时,它完成并退出内存就好了。
有没有人知道这里可能发生了什么?
I have a Windows executable written in C#. It is run by our customer
in
three ways: from Windows Explorer, as a scheduled task, or kicked off by
another process.
When the exe is started by the other process, it completes its work
but
then remiains resident in memory forever. When it is run as a task or by
the
user, it completes and exits memory just fine.
Does anyone have an idea of what may be going on here?



你是说你仍然看到在任务

管理器中运行的进程,你必须手动终止进程吗?

Are you saying that you still see the process running in the Task
Manager, and you have to kill the process manually?


程序中有一些东西阻止它终止。

你的代码在程序行为方面有什么不同吗

由用户启动还是由另一个程序启动?对于这两类用户,退出路径是否不同?


" Chris Jones" <章******** @ discussions.microsoft.com>在消息中写道

新闻:DC ********************************** @ microsof t.com ...
There is something in the program that is preventing it from terminating.
Is there any difference in your code as to how the program behaves when its
started by the user or started by another program? Are the exit paths
different for these two types of users?

"Chris Jones" <Ch********@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
我有一个用C#编写的Windows可执行文件。它由我们的客户以三种方式运行:从Windows资源管理器,作为计划任务,或由另一个进程启动。
当exe由另一个进程启动时过程,它完成了它的工作
然后
然后remiains永远驻留在记忆中。当它作为任务运行或由
用户运行时,它完成并退出内存就好了。
有没有人知道这里可能发生了什么?
I have a Windows executable written in C#. It is run by our customer
in
three ways: from Windows Explorer, as a scheduled task, or kicked off by
another process.
When the exe is started by the other process, it completes its work
but
then remiains resident in memory forever. When it is run as a task or by
the
user, it completes and exits memory just fine.
Does anyone have an idea of what may be going on here?



这篇关于进程不会退出 - 帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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