序列化期间发生System.OutOfMemoryException [英] System.OutOfMemoryException during serialization

查看:77
本文介绍了序列化期间发生System.OutOfMemoryException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

序列化对象时抛出此错误
我正在使用xamlwriter.save(object,stream)方法
但是它抛出了内存不足的异常.


我的对象很大(500 mb),我正在使用memorystream来保存xaml信息.
有什么办法可以避免此错误...

如果还有另一种序列化方法,请提供帮助..

on serialization of an object this error is thrown
i am using xamlwriter.save(object,stream) method
but it is throwing outofmemoryexception.


my object is of huge size(500 mb) and i m using memorystream to save xaml information.
is there any way to avoid this error...

if there is another way to serialization then please help..

推荐答案

如果您拥有1Gb Xaml文件,则您做的事情根本上是错误的.
唯一的建议是在64位框架上运行并希望获得最佳效果,否则请重新考虑您的设计.
You are doing things fundamentally wrong if you have a 1Gb Xaml file.

The only advise is to run on the 64bit framework and hope for the best, otherwise rethink your design.


这篇关于序列化期间发生System.OutOfMemoryException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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