如何避免在WPF海量的内存泄漏的.Net 3.5? [英] How to avoid massive memory leaks on WPF on .Net 3.5?
问题描述
当我跑我的应用程序针对.NET 3.5拥有海量内存泄漏。 50MB每次我分配一个用户控件到本地参考。我只创建每个用户控件的一个实例。如果我编译并运行相同的code针对.NET 4.0中运行的一切围绕50MB标志罚款徘徊。
When I run my app targeted to .Net 3.5 it has massive memory leaks. 50mb every time I assign a UserControl to a local ref. I only ever create one instance of each UserControl. If I compile and run the same code targeted to .Net 4.0 everything runs fine hovering around the 50mb mark.
这是一个已知的isue 3.5?即它不是可用的刺?
Is this a known isue with 3.5? I.e. it's not usable in prod?
/我的客户只有3.5,不会移动到4.0一段时间,所以我没有容易的选择
/My clients only have 3.5 and won't be moving to 4.0 for awhile so i don't have the easy option
推荐答案
内存泄漏的修补程序的WPF 3.5 SP1
http://www.infoq.com/news/2010/06/WPF - 内存 - 泄漏
在特定的,看看这两个修补程序,已被固定在.NET 4.0中,但可作为修补程序的.NET 3.5的用户:
In particular, have a look at these two hotfixes, which have been fixed in .NET 4.0, but are available as hotfixes to users of .NET 3.5:
http://support.microsoft.com/kb/967634
http://support.microsoft.com/kb/967328
这篇关于如何避免在WPF海量的内存泄漏的.Net 3.5?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!