Recently we noticed that
our product was not up for garbage collection when a user logged out,
instead the entire product instance was held in memory. We've isolated it to
what seems to be the RadMenu. Specifically the RadMenuItem when used as a SubMenuItem.
This appears to happen either with RadMenuItems built in XAML, code behind, or
binding to a collection with a template.
I have sample project to reproduce the issue but I couldn't attach it here. This occurs with the newest version 2016.1.112 and previous 2015.3.1104,
I’m not sure of other releases.
is a PDF of the Instance Retention Graph from a popular memory profiler.
We have used
RadMenus extensively throughout the product and were able
to mitigate the issue with manual recursive cleanup by traversing the
visual tree to decouple the RadMenuItems, by clearing all RadMenuItems of
subitems and then all RadMenu's of all RadMenuItems. This has allowed the vast
majority of the product to be collected with the exception of the RadMenuItems
items themselves, which appear to be held onto by a ResourceDictionary.
noticed this type of behavior with any other control, either Telerik or ours.
Is this supposed to be doing this or are we supposed to do something else to
release the memory?
If you need any
additional info, please don’t hesitate to ask. Thank you,