(E-Mail Removed) wrote:
> hi,
> i have written a c# program ,in which i have multiple forms.
> when i start the application ,the main form opens ,from which iam
> calling another form using showdialog(this) method. after that from the
> second form iam calling the third form ,again using the same
> method,like this iam calling seven forms one after the other, in the
> last again i am coming on the main form, this thing is continuous.each
> form
> now the problem is that each time new form open,memory uasge
> increases,this thins thing repeats continuously,due to which when run
> the same application two -three times,memory usage increases which is
> seen in the task manager.
> please provide me the solution for this ,
> this is very urgent..
When you open a form using ShowDialog, you must dispose it after you
close the form. It sounds like you are not disposing the form when you
are done. This is not required when you open the form using Show,
only when using ShowDialog.