Skip to main content
Home Forums Silverlight Programming Report a Silverlight Bug Memory Leak using StaticResource with ValueConverter in DataGrid
0 replies. Latest Post by jmorg on July 16, 2009.
(0)
jmorg
Member
2 points
10 Posts
07-16-2009 8:58 AM |
When using a ValueConverter that makes use of StaticResource to convert value into view format, the parent object never seems to be garbage collected.
Example:
Here I’m using a TerminalStatusConverter which converts “Status” value to image string name for BitmapImage.
</data:DataGridTemplateColumn>
Using WinDbg I can see that the BitmapImage objects grow and never get garbage collected, even if the datagrid source is pointed to a different ObservableCollection.
WinDbg shows that a .Collections.Generic.Dictionary`2+Entry is keeping a reference to the BitmapImage. What is it? This can happen with Strings as well.
054d0428(System.Windows.Media.Imaging.BitmapImage)->
Any suggestions?