Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to dispose a DialogForm and its object when closed
Message
From
06/05/2005 02:45:33
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
How to dispose a DialogForm and its object when closed
Miscellaneous
Thread ID:
01011518
Message ID:
01011518
Views:
63
Hi Guys,

Im currently developing an application in C#. I created a class for my dialog form and compiled it as DLL. I then instantiate my dialog form from the dll.

One thing I noticed in my program is that the longer I used it, the slower the application goes. I tried to check my memory in the Task Manager(Performance Tab). I noticed that everytime I click a button that calls my dialog form, the PF Usage gradually increases. If I close the dialog form, the memory is not released. I tried to strain the program and the memory usage reach a 1GB which resulted to hanging.

I tried calling the dispose method of my form but it does not release the used memory either. Here is a sample code

homeForm = new Form_Address1("Home Address);
if (homeForm.ShowDialog(this) == DialogResult.OK)
{
homeForm.Dispose();
}

any idea?

Thanks in advance...
Music Rocks www.musicreserve.blogspot.com
Success is 1% Inspiration & 99% Perspiration
God Sometimes Delays His Help to Test Our Faith and Energize Our Prayers
Our Boat May Be Tossed While He Sleeps, But He Wakes Up Before it Sinks.
Next
Reply
Map
View

Click here to load this message in the networking platform