Hello,
Looks like your XamTabControl is leaking memory. If I replace the XamTabControl with a regular TabControl memoy is released after I force a Garbage Collection. I have the following simpe XAML:
<UserControl x:Class="ControlsLibrary.wpf.TabUserControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:igWindows="http://infragistics.com/Windows" > <Grid> <igWindows:XamTabControl> </igWindows:XamTabControl> <!--<TabControl> </TabControl>--> </Grid></UserControl>
with the following code behind:
public partial class TabUserControl : UserControl { //Mailbox parent; //UserControl activeContent; public byte[ myMemory = new byte[50 * 1024 * 1024]; public TabUserControl() : this(null, null, -1) { InitializeComponent(); } }
Please try this and advise.
Klaus
Can you provide a sample that demonstrates the problem where the control should have been released but wasn't?
i have the same problem as described above.
I want to dispose DetailFrame, but it seems that ControlThemeInfo has the reference.
How can i solve that ? I run Infragistics 9.1 HotFix.
When i remove Theme="Office2k7Blue" attribute from XamTabControl markup everything seems to work well. I have noticed the same problem with other controls :(
Is there a way to remove event handlers in the code ?
I ran this (after fixing the the myMemory field declaration - missing the ]) through a memory profiler (I used the Scitech one) and neither the UserControl, XamTabControl nor the Window that contained these were rooted in memory so I don't see a memory leak. Again perhaps there is something more occuring in the project in which you are seeing the problem that is contributing to the issue. If you would like us to look into it I would recommend providing a sample that demonstrates the problem to the support group.
public partial class TabUserControl : UserControl { //Mailbox parent; //UserControl activeContent; public byte[ myMemory = new byte[50 * 1024 * 1024]; public TabUserControl() { InitializeComponent(); } }
Create an instance of TabUserControl and add to a Window.
Open and close the Window, then force a GC. Observe that the 50M allocated is not released.
Instead of XamTabControl, use WPF's native TabControl. Perform the same operations and observe that memory is released after you force a GC.
The snippet you provided doesn't seem like it would compile and it doesn't show how the usercontrol was being used but if you can provide a sample I'll take a look.