应用程序内存不足异常 [英] Application Out of memory exception

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

问题描述

我正在为儿童开发一款静态游戏.此处的静态表示不涉及物理和游戏引擎. Silverlight故事板仅使用了简单的换帧动画,并且在XNA库的帮助下还使用了一些背景声音. 但是,我的应用程序播放10-15分钟并崩溃时,它的内存不足.我将停止所有情节提要板,将对象和事件设置为空值,然后再将对象分配给OnNavigatedFrom事件.但无法找出确切的 造成这种情况的原因. Application xap文件大小为29mb,运行时将获得100+ Mb的内存.

I am developing a static game for children. Static here means there is no physics and game engine involved. Just simple frame change animation has been used with silverlight storyboards and using some background sounds also with the help of XNA library. But my application is running out of memory when it is being played for 10-15 min and crashing. I am stoping all storyboards, disposing objects and event giving null value before disposing objects in OnNavigatedFrom event. But not able to find out the exact cause why this is happening. The Application xap file size is 29mb and it is getting 100+ Mb of memory while running.

所以,如果有人可以给我一些想法.???????

So if anybody can give me some idea.???????

感谢所有人

推荐答案

在Visual Studio中,您可以使用调试"->启动性能分析"来观察内存消耗.一种方法是从解决方案的副本开始,然后使用分而治之的技术,有选择地删除功能,直到内存泄漏消失为止.

In Visual Studio, you can use Debug->Start performance analysis to observe memory consumption. One approach is to start with a copy of your solution and then use divide-and-conquer techniques, selectively removing features until the memory leak disappears.

希望这会有所帮助,
标记

Hope this helps,
Mark


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

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