我的应用程序中出现Out of Memory异常 [英] Out of Memory exception occur in my Application

查看:128
本文介绍了我的应用程序中出现Out of Memory异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有8GB内存。 500 GB硬盘。我正在使用vs2010。当我运行我的应用程序时,它会显示内存不足异常。我不知道它为什么会发生以及如何跟踪异常路径或内存泄漏路径。?

谢谢

Hi I''ve 8GB RAM. 500 GB Hard disk. i''m using vs2010. when i run my application its show me out of memory exception.? i don''t know why its occur and how to track the exception path or memory leakage path.?
Thanks

推荐答案

重启你的应用程序,如果仍然存在问题,请提及一些代码,您将获得异常。
Restart your application if still problem exists mention some code where you are getting the exception.


尝试通过在您认为代码出错的地方插入断点来进行调试。

您可能会有一些想法。

当系统无法处理您所处理的所有内容时,通常会出现内存不足的异常。

例如:如果有的话一个应用程序,其功能是100行作为HTML输出,然后一个给出输入,如结果包含几千行。在这种情况下,系统将抛出一个内存不足的异常。



尝试优化代码,检查是否有产生大量行的查询。



希望它有所帮助。 />


问候

Anurag
Try to debug by inserting breakpoints where you feel your code is going wrong.
You might get some idea.
Usually out of memory exception arises when the system is not able to process what all you have given it to process.
For ex:if one has an app whose capability is 100 rows as an HTML output, and then one gives input such as the result comprises of some thousands of rows.In this case, the system will throw an out of memory exception.

Try to optimize your code, check if you are having queries which yield a large number of rows.

Hope it helps.

Regards
Anurag


这篇关于我的应用程序中出现Out of Memory异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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