Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2815
Leaking memory
posted

 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

 

 

Parents
  • 54937
    Offline posted

    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.

Reply Children