为什么Windows 7占用了我所有的内存而Vista却没有? [英] Why is Windows 7 consuming all of my memory and Vista is not?
本文介绍了为什么Windows 7占用了我所有的内存而Vista却没有?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在运行一个用C#编写的多线程应用程序,该应用程序在Vista上可以正常运行,但是当我在Windows 7上安装并运行它时,它会消耗我所有的内存,并最终崩溃!
提前谢谢.
-Donald
I''m running a multi-threaded app that I wrote in C# that works just fine on Vista but when I install and run it on Windows 7 it consumes all of my memory and eventually crashes!
Thanks in advance.
-Donald
推荐答案
这是我的正式答案: 可能是任何东西.
我希望我能给出更详细的答案,但我认为它与您提供给我们的信息非常有帮助,以帮助您解决问题.
可能是:
0)未释放的非托管资源
1)不断添加内容的失控循环
2)您正在操纵很多大字符串
3)对象永远不会超出范围(并保持创建状态),因此垃圾收集器无法收集垃圾.
绝对是代码中某种形式的内存泄漏.
This is my official answer: It could be anything.
I wish I could give a more detailed answer, but I think it pretty much matches with the info you gave us to help you with the problem.
It could be:
0) Unmanaged resources not being released
1) A run-away loop that keeps adding stuff
2) You''re manipulating a lot of big strings
3) Objects never go out of scope (and keep being created), and therefore the garbage collector can''t collect the garbage.
It''s definitely a memory leak of some kind in your code.
这篇关于为什么Windows 7占用了我所有的内存而Vista却没有?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文