The leak turned out to be related to the RadRichTextBox's ContextMenu
, you can read more about it in the public item:
RichTextBox: Memory leak related to ContextMenu
ContextMenu is loaded with MEF, which internally caches the instance, and it holds a reference to the RadRichTextBox.
One simple workaround is to avoid the caching using the workarounds listed in the item:
- manually set different instances of ContextMenu to all your RadRichTextBox-es:
- Create custom context menu that will be non-sharable. MEF will automatically load different instances of it for all RadRichTextBoxes on demand:
NonSharedContextMenu : ContextMenu
If this is not your case, I would suggest opening a separate support ticket and send us sample application which reproduces the problem, along with specific steps to reproduce. Memory leaks sometimes reveals in specific situations, and this will help us pinpoint the issue faster.