S
Steven Blair
Hi,
A GUI I have been writing appears to be using a lot of memory. The amount of
memory being used (Windows Task Manager) rarely decreases.
When I open a new form, most of the time the memory usage increases. I was
under the impression C#'s Garbage collector handled this for the
programming?
Here is one of two examples of things I am doing:
if(MDIChildCheck(typeof(frmDBConfig)) )
{
frmDBConfig f = new frmDBConfig();
f.MdiParent = this;
f.Show();
}
Once this form is closed, would the memory be released? (The form is closed
this.Close()
Another example:
Form f=this.ActiveMdiChild;
if(this.ActiveMdiChild.GetType() == typeof(frmUsers))
{
((frmUsers)f).EditUser();
}
Again, I am assuming the memory would be released?
The problem I see is, my application memory usage just keeps on growing, and
eventually would eat up the PC's resources. I think I understand that when
the application is completely stopped, the GC would release the memory.
Any help on this matter would be appreciated.
Regards,
Steven
A GUI I have been writing appears to be using a lot of memory. The amount of
memory being used (Windows Task Manager) rarely decreases.
When I open a new form, most of the time the memory usage increases. I was
under the impression C#'s Garbage collector handled this for the
programming?
Here is one of two examples of things I am doing:
if(MDIChildCheck(typeof(frmDBConfig)) )
{
frmDBConfig f = new frmDBConfig();
f.MdiParent = this;
f.Show();
}
Once this form is closed, would the memory be released? (The form is closed
this.Close()

Another example:
Form f=this.ActiveMdiChild;
if(this.ActiveMdiChild.GetType() == typeof(frmUsers))
{
((frmUsers)f).EditUser();
}
Again, I am assuming the memory would be released?
The problem I see is, my application memory usage just keeps on growing, and
eventually would eat up the PC's resources. I think I understand that when
the application is completely stopped, the GC would release the memory.
Any help on this matter would be appreciated.
Regards,
Steven