停止GC [英] stop the GC

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

问题描述

你好!


有什么办法可以在一段时间内停止垃圾收集。


可以说,我有一个表格。在表单加载之前我暂停GC并且当表格显示

时恢复GC

Hi there!

Is there any way how can I stop garbage collection for a period of time.

Lets say, I have a form. Before form load I pause the GC and when the form
is shown resume GC

推荐答案

我不要不这么认为。

如果一个应用程序停止GC并且再也没有启动它会怎么样?


-

Miha Markic [MVP C#] - RightHand .NET咨询&软件开发

miha at rthand com
www.rthand.com


" Vadym Stetsyak" < PD **** @ ukr.net>在消息中写道

新闻:e6 ************* @ TK2MSFTNGP12.phx.gbl ...
I don''t think so.
What would happen if one app stops GC and never starts it again?

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Vadym Stetsyak" <pd****@ukr.net> wrote in message
news:e6*************@TK2MSFTNGP12.phx.gbl...
你好!

有什么办法可以阻止垃圾收集一段时间。

让我们说,我有一个表格。在表单加载之前我暂停GC并在表格显示
时恢复GC
Hi there!

Is there any way how can I stop garbage collection for a period of time.

Lets say, I have a form. Before form load I pause the GC and when the form
is shown resume GC



一个泄漏了大量内存的应用程序: D

Miha Markic [MVP C#]" < miha at rthand com>在消息中写道

新闻:OP ************* @ TK2MSFTNGP12.phx.gbl ...
One app thats leaking alot of memory :D
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:OP*************@TK2MSFTNGP12.phx.gbl...
我不认为所以。
如果一个应用程序停止GC并且再也没有启动它会发生什么?

- Miha Markic [MVP C#] - RightHand .NET咨询&软件开发
miha at rthand com
www.rthand.com

Vadym Stetsyak < PD **** @ ukr.net>在消息中写道
新闻:e6 ************* @ TK2MSFTNGP12.phx.gbl ...
I don''t think so.
What would happen if one app stops GC and never starts it again?

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Vadym Stetsyak" <pd****@ukr.net> wrote in message
news:e6*************@TK2MSFTNGP12.phx.gbl...
你好!
有什么办法可以在一段时间内停止垃圾收集。

让我们说,我有一个表格。在表单加载之前我暂停GC并在显示
表单时恢复GC
Hi there!

Is there any way how can I stop garbage collection for a period of time.

Lets say, I have a form. Before form load I pause the GC and when the form is shown resume GC




嗯,AFAIK垃圾收集器在托管堆中运行,每个.NET应用程序

都有自己的堆,所以我可以假设每个堆都有自己的收集器。


Miha Markic [MVP C#]" < miha at rthand com>在消息中写道

新闻:OP ************* @ TK2MSFTNGP12.phx.gbl ...
hmm, AFAIK Garbage Collector operates in the managed heap and every .NET app
has its own heap, so I can assume that every heap has its own collector.

"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:OP*************@TK2MSFTNGP12.phx.gbl...
我不认为所以。
如果一个应用程序停止GC并且再也没有启动它会发生什么?

- Miha Markic [MVP C#] - RightHand .NET咨询&软件开发
miha at rthand com
www.rthand.com

Vadym Stetsyak < PD **** @ ukr.net>在消息中写道
新闻:e6 ************* @ TK2MSFTNGP12.phx.gbl ...
I don''t think so.
What would happen if one app stops GC and never starts it again?

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"Vadym Stetsyak" <pd****@ukr.net> wrote in message
news:e6*************@TK2MSFTNGP12.phx.gbl...
你好!
有什么办法可以在一段时间内停止垃圾收集。

让我们说,我有一个表格。在表单加载之前我暂停GC并在显示
表单时恢复GC
Hi there!

Is there any way how can I stop garbage collection for a period of time.

Lets say, I have a form. Before form load I pause the GC and when the form is shown resume GC




这篇关于停止GC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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