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
80
Memory Leak issue with using ContentPane
posted

Hi,

I am using TabGroupPane control within XamDocManager control for adding new tabs in TabGroupPane.

I am creating ContentPane dynamically and setting its content to UserControl,

when i add ContentPane to TabGroupPane immedially Memory Usage increasing in TaskManager and after closing Pane its not releasing that memory,

every time when i add ContentPane memory increases continuously.

this is very critical issue,

please provide solution as soon as possible.

I have tried with below solution on PaneClosing event, still the same issue.

private void xamDockManager_PaneClosing(object sender, CancellablePaneEventArgs e)
        {
            try
            {
                if (this.xamDockManager.Panes.Contains(e.Pane))
                {
                    this.xamDockManager.Panes.Remove(e.Pane);
                }
                if (this.xamDockManager.DocumentContentHost.Panes.Contains(e.Pane.OwnerPane as TabGroupPane))
                {
                    TabGroupPane tgp = e.Pane.OwnerPane as TabGroupPane;
                    tgp.Panes.Remove(e.Pane as ContentPane);
                }

                GC.Collect();
                GC.WaitForPendingFinalizers();
                GC.Collect();
             
            }
            catch { }
        }

please help me to resolve this memory leak issue.

thanks,

uc