PC Review


Reply
Thread Tools Rate Thread

c# memory leakage

 
 
lolarak_pandey@cms.com
Guest
Posts: n/a
 
      21st Sep 2006
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..

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?=
Guest
Posts: n/a
 
      21st Sep 2006
From the way you descibe it you are opening a form. Then opening nested child
dialog forms to 7 deep. Then from the most nested for, re-opening the main
form which then does this all again.
My suggestion to the above is redesign your UI so you dont keep opening so
many popup forms.

HTH

Ciaran O'Donnell

"(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..
>
>

 
Reply With Quote
 
Chris Dunaway
Guest
Posts: n/a
 
      21st Sep 2006

(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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory Leakage daniel kaplan Microsoft Windows 2000 Developer 4 26th Oct 2004 02:07 PM
Memory Leakage Erdem ALKILIÇGIL Microsoft Dot NET Compact Framework 2 2nd Jul 2004 03:55 PM
Memory leakage !! Sirria Microsoft VC .NET 1 10th Feb 2004 12:23 PM
Memory leakage!! Sirria Microsoft VC .NET 0 4th Feb 2004 12:47 PM
Memory Leakage Moobi Windows XP Performance 0 14th Jul 2003 12:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:42 AM.