Posted 16 years ago
by Roger Rong
Version: 1.5.43
Platform: .NET 2.0
Environment: Windows XP (32-bit)
Hi All,
We have got a situation that it leaks the memory when creating document windows. Using the profiler tool (.Net Memroy Filer 3.0) we found that the "ActiproSoftware.UIStudio.TabStrip.VisualStudio2005DocumentWindowTabStripRenderer" object associated with the document is not teared down when the document window is closed.
We could reproduce it in a simple C# demo app, following is part of the code of it:
We have got a situation that it leaks the memory when creating document windows. Using the profiler tool (.Net Memroy Filer 3.0) we found that the "ActiproSoftware.UIStudio.TabStrip.VisualStudio2005DocumentWindowTabStripRenderer" object associated with the document is not teared down when the document window is closed.
We could reproduce it in a simple C# demo app, following is part of the code of it:
namespace TestDocumentWindowMemoryLeak
{
public partial class Form1 : Form
{
private string _WindowKey = string.Empty;
public Form1()
{
InitializeComponent();
}
/// <summary>
/// timer1 is triggered for every 3 seconds, in which the existing document window
/// is closed and a new one is created.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void timer1_Tick(object sender, EventArgs e)
{
if (_WindowKey != string.Empty)
{
this.dockManager1.DocumentWindows[_WindowKey].Close();
}
_WindowKey = Guid.NewGuid().ToString();
ActiproSoftware.UIStudio.Dock.DocumentWindow theWindow = new ActiproSoftware.UIStudio.Dock.DocumentWindow(this.dockManager1, _WindowKey, _WindowKey, null, new UserControl1());
theWindow.Activate(false);
}
}
}