当前位置: 代码迷 >> Silverlight >> silverlight中MemoryStream内存释放有关问题
  详细解决方案

silverlight中MemoryStream内存释放有关问题

热度:5891   发布时间:2013-02-26 00:00:00.0
silverlight中MemoryStream内存释放问题?
C# code
            using (MemoryStream ms = new MemoryStream())            {                using (StreamWriter writer = new StreamWriter(ms))                {                    int count = 1024 * 1024 * 40;                    char[] str = new char[count];                                        while (count-- > 0)                        str[count] = '*';                    writer.Write(str);                    writer.Flush();                }            }

今天测试向MemoryStream中写入大数据,结果发现在silverlight中内存不会被释放,达200多MB,但在asp.net中可以。why?
  相关解决方案