Hello Team Telerik,
This is very likely a simple question to answer:
My test winforms application (Telerik Winforms components Q2 2010) has one RadPageView component on Form1. Each Button1 click will create a new PageViewPage and put a RadDock on it (see code below). Running this app from within VS2008 will show in Windows Taskmanager (Windows 7 32 bit) after the application-start approx. 40MB memory working set. Clicking 20 times on Button1 will increase the memory to approx 80MB. Closing all pages by clicking on the X button of the PageView TabStrip will not reduce the amount of used memory (instead creating another set of 20 pages by clicking Button1 will result in further increased memory allocation).
Trying to remove dock1 from the page and disposing it when the page is removed did not help:
Thank you very much for any feedback.
Regards,
Ralf
This is very likely a simple question to answer:
My test winforms application (Telerik Winforms components Q2 2010) has one RadPageView component on Form1. Each Button1 click will create a new PageViewPage and put a RadDock on it (see code below). Running this app from within VS2008 will show in Windows Taskmanager (Windows 7 32 bit) after the application-start approx. 40MB memory working set. Clicking 20 times on Button1 will increase the memory to approx 80MB. Closing all pages by clicking on the X button of the PageView TabStrip will not reduce the amount of used memory (instead creating another set of 20 pages by clicking Button1 will result in further increased memory allocation).
namespace WindowsFormsApplication4
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
RadPageViewPage page = new RadPageViewPage();
page.Text = "Page";
RadDock dock1 = new Telerik.WinControls.UI.Docking.RadDock();
dock1.Dock = System.Windows.Forms.DockStyle.Fill;
page.Controls.Add(dock1);
this.radPageView1.Pages.Add(page);
this.radPageView1.SelectedPage = page;
}
}
}
Trying to remove dock1 from the page and disposing it when the page is removed did not help:
private void radPageView1_PageRemoving(object sender, RadPageViewCancelEventArgs e)
{
RadDock dock1;
RadPageViewPage page = this.radPageView1.SelectedPage;
if (page != null)
{
Control[] pagecontrols = page.Controls.Find("radDock1", false);
int numerofpagecontrols = pagecontrols.Length;
if (numerofpagecontrols == 1)
{
dock1 = (RadDock)pagecontrols[0];
page.Controls.Remove(dock1);
dock1.Dispose();
}
}
}
Thank you very much for any feedback.
Regards,
Ralf