Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to dispose a DialogForm and its object when closed
Message
De
06/05/2005 02:45:33
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
How to dispose a DialogForm and its object when closed
Divers
Thread ID:
01011518
Message ID:
01011518
Vues:
64
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform