System.OutOfMemoryException:内存不足,无法继续执行程序 [英] System.OutOfMemoryException: Insufficient memory to continue the execution of the program

查看:3077
本文介绍了System.OutOfMemoryException:内存不足,无法继续执行程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)

推荐答案

微小的代码片段究竟出了什么问题,并告诉您执行此操作",它将解决此问题.
但是,我将从对Invoke行断点开始,看看到底是什么被调用-以及从何处开始.

可能是您在某个地方建立了一个递归循环,它只是在调用自身直到空间用完.
We can''t positively tell you from the tiny code fragment what exactly is wrong, and tell you "do this" and it''ll fix it.
However, I would start by breakpointing the Invoke line and see ing what exactly is being invoked - and from where.

The chances are that you have set up a recursive loop somewhere, and it is just calling itself until it runs out of space.


我遇到了同样的问题
但我认为可能是因为您没有重新分配
记忆
因此您可以尝试通过执行
来调用垃圾收集器 gc.collect()方法
I am Having Same Problem
But i think it may be because you are not reallocating the
memory
so you can try to call garbage collector by executing
gc.collect() method


这篇关于System.OutOfMemoryException:内存不足,无法继续执行程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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