473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

c# memory leakage

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

Sep 21 '06 #1
2 1895
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

"lo************@cms.com" 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..

Sep 21 '06 #2

lo************@cms.com 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.

Sep 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: frustrated | last post by:
Before I begin, I must first make the following disclaimer: Although I have considerable programming experience, I do not consider myself by any means to be an expert C++ programmer. The following...
2
by: Sambucus | last post by:
Hi group! I am using C++ and java with JNI to get some text in a RICHEDIT to my java program. I do so by accessing a C++ method every second. It all works fine except that it leaks memory every...
7
by: andylcx | last post by:
hi all: I have a code like below, is there any serious memory leakage in my code. I am confusion now but no idea how to fix it. In the member function of class A, I create a new object of class B...
10
by: s.subbarayan | last post by:
Dear all, I happen to come across this exciting inspiring article regarding memory leaks in this website: http://www.embedded.com/story/OEG20020222S0026 In this article the author mentions:...
18
by: Ramasubbu Ramasubramanian XR (AS/EAB) | last post by:
What is memory leakage, could any one explain with sample code
1
by: Gaël | last post by:
Hi everybody! I have a really big problem with ASP.NET application. I noticed that the w3wp.exe memory size, increase with the time and the use of my website. When it raise a certain value, w3wp...
0
by: kiran kumar | last post by:
Hi All, I am working on embedded python on C these days. I feel there is a memory leakage in this code. I have used our own memory pool and all the python code will use the heap from this memory...
14
by: madhawi | last post by:
i want to know that on what situation memory leakage happan and what is the solution to solve the problem of memory leakage.
3
by: Godzilla | last post by:
Hello, I have a program that create and pop an object off a queue, but it is experiencing some memory leakage. I have been unable to detect where the memory leakage occur. The strange thing is...
11
by: prpradip | last post by:
I have an ImageList (_imageList). In _imageList I have put large numbers of Icons. Now what I need is to get Handle of all Icons that I put in _imageList, so that I can destroy (DestoryIcon) them...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.