Memory Leak when creating Document Windows

Docking/MDI for Windows Forms Forum

Posted 11 years ago by Roger Rong
Version: 1.5.0043
Platform: Services
Environment: Windows XP (32-bit)
Avatar
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:

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);
        }
    }
}

Comments (4)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Roger, since you have your test project already set up, can you please email it over and we'll use it to debug? Thanks!


Actipro Software Support

Posted 11 years ago by Roger Rong
Avatar
Thans for your response. The test app has been sent to 'support@actiprosoftware.com'.
Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Just for the benefit of anyone reading this, this issue was resolved in a WinUICore update from a while ago and is not a problem in UIStudio v2.0.


Actipro Software Support

Posted 11 years ago by Roger Rong
Avatar
Yes, we tried the 2.0 trial version and it works perfectly.

Updating:

According to the testing we have performed, this issue has been fixed in the ActiproSoftware.WinUICore.Net11.dll version 1.0.94.0 which goes with UIStudio Version 1.5.44.


Roger

[Modified at 03/17/2008 10:41 PM]
The latest build of this product (v2018.1 build 0341) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.