最近在找一些关于Silverlight 程序内存泄露的问题。找到一篇2008年10月的blog ,里面列举了一些已知的bug和修补办法,不确定这些bug在新版本中是否被修复了。其中果然有内存泄露相关的bug....
Memory Leak when you Dynamically add and remove Images
Workaround: When dynamically adding or removing BitmapImages from an application (a.k.a. adding/removing from the tree), you should set Image.Source = null before removing the Image element from the tree. This will make the BitmapImage eligible for garbage collection.
Bug Status: Active bug. *
ImageSource and ImageBrush events can cause a memory leak
搜索Microsoft Connect 网站又找到一个,Silverlight 4中的关于内存的bug:
本文总结了Silverlight程序中常见的内存泄露问题及解决方案,包括动态添加和移除图片时的内存泄露现象及其解决方法,以及Silverlight 4中高内存使用导致页面导航崩溃的bug。
1万+

被折叠的 条评论
为什么被折叠?



