Using the .NET Memory Profiler from http://memprofiler.com/ I am finding any xamchart I create is never garbage collected. I am even seeing the same behavior in the XamFeatureBrowser. CarouselPanels get reclaimed by the garbage collector but XamCharts never do. In my application it appears that the ThemeManger q and b instances are static and hold references to the charts? Am I supposed to call Dispose some where? Any help would be appreciated.
The output below is from the .NET Memory Profiler
Reference 1__________________System.Windows FrameworkElement[ 0000114,870[3]System.Collections.Generic List<FrameworkElement> 0000084,690._itemsSystem.Windows ResourceDictionary 0000076,180._ownerFEsSystem.Collections.Generic Dictionary<ResourceDictionary, ResourceDictionary>.Entry[ 0000061,616[0].valueSystem.Collections.Generic Dictionary<ResourceDictionary, ResourceDictionary> 0000061,618.entriesInfragistics.Windows.Themes ThemeManager qReference 2___________________System.Windows FrameworkElement[ 0000114,870[3]System.Collections.Generic List<FrameworkElement> 0000084,690._itemsSystem.Windows ResourceDictionary 0000076,180._ownerFEsInfragistics.Windows.Chart XamChart 0000001,627.nSystem.Windows.Media LinearGradientBrush 0000078,714._contextStorageSystem.Collections Hashtable.bucket[ 0000078,678System.Collections Hashtable 0000078,578.bucketsSystem.Windows ResourceDictionary 0000078,583._baseDictionarySystem.Windows ResourceDictionary[ 0000078,577[0]System.Collections.Generic List<ResourceDictionary> 0000078,574._itemsSystem.Collections.ObjectModel ObservableCollection<ResourceDictionary> 0000078,237.itemsSystem.Windows ResourceDictionary 0000078,228._mergedDictionaries bu 0000078,229.b bu aReference 3_________________System.Windows FrameworkElement[ 0000114,870[3]System.Collections.Generic List<FrameworkElement> 0000084,690._itemsSystem.Windows ResourceDictionary 0000076,180._ownerFEsInfragistics.Windows.Chart XamChart 0000001,627.nSystem.Windows.Media LinearGradientBrush 0000078,714._contextStorageSystem.Collections Hashtable.bucket[ 0000078,678System.Collections Hashtable 0000078,578.bucketsSystem.Windows ResourceDictionary 0000078,583._baseDictionarySystem.Windows ResourceDictionary[ 0000078,577[0]System.Collections.Generic List<ResourceDictionary> 0000078,574._itemsSystem.Collections.ObjectModel ObservableCollection<ResourceDictionary> 0000078,237.itemsSystem.Windows ResourceDictionary 0000078,228._mergedDictionariesSystem.Windows ResourceDictionary[ 0000078,882[0]Infragistics.Windows.Themes ThemeManager.a 0000078,883.valuesInfragistics.Windows.Themes ThemeManager.a[ 0000061,597[4]System.Collections.Generic SortedList<string, ThemeManager.a> 0000061,600.valuesInfragistics.Windows.Themes ThemeManager b
This appears to be addressed WPF 2008 Vol. 1, so I am all set. Wierd thing is I did reprocuce right after I updated, but then after reboot it went away. The new Feature Browser also does NOT have the problem.
yes, this is fixed in the 8.1 release and will be fixed in the next 7.2 hotfix.
I have posted a question in the ribbon forum. In case anyone wants to see it, here's the URL. http://community.infragistics.com/forums/p/44707/243110.aspx#243110
David, thank you for your response!
I believe the memory issues were caused by event handlers holding references to disposed objects, but this was a long time ago, and it's hard to tell based on this thread because we never analyzed flagrant99's issue directly.
most likely, the issue with the RibbonTabItem isn't related. I recommend posting your question in the xamribbon forum: http://community.infragistics.com/forums/198.aspx
Hi David,
May I ask what was changed in order to resolve this issue? I'm seeing a similar issue with Infragistics.Windows.Ribbon.RibbonTabItem even after I have called Ribbon.Tabs.Clear(). I'm not sure if it has something to do with the way our application is managing ResourceDictionaries or if it's something wrong with the RibbonTabItem. I'm using version 2010.1.
I've attached a screen shot of an object reference graph in case that's helpful. The SharedResourceDictionary is a class we wrote. Note in particular the reference from ResourceDictionary._ownerFEs.
Thanks!
-Andrew