473,466 Members | 1,408 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Memory release after form close

HI,
In my windows application (VB.NET) when I open a form the memory is
increasing but When I close it the memory doen't decrease (task manager).
each time I close the form and re-open it the memory is increasing.
with the time the machine (512 MO) become slow.
Is there a way to release the memory when closing the form.
Thanks
Jun 27 '08 #1
3 4830
"touf" <to****@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
HI,
In my windows application (VB.NET) when I open a form the memory is
increasing but When I close it the memory doen't decrease (task manager).
each time I close the form and re-open it the memory is increasing.
with the time the machine (512 MO) become slow.
Is there a way to release the memory when closing the form.
Thanks
Do you have any variables in your form that you reference outside the form.
If so, it may be that these variables are being recreated and then
rereferenced every time you open the form but because they are referenced
outside the form they're not being released when you close them.

Mike.
Jun 27 '08 #2
Touf,

The taskmanager is far from acurate, beside that, what is the problem with
used memory as there is enough to use.

As it is because of your systemadministrator, then search for this on Google
while using the name Posseth, he has a nice routine (which spent some time),
that keeps system administrators happy. (It is not releasing more memory, as
it is often already released but not showed in taskmanager).

Cor

"touf" <to****@hotmail.comschreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
HI,
In my windows application (VB.NET) when I open a form the memory is
increasing but When I close it the memory doen't decrease (task manager).
each time I close the form and re-open it the memory is increasing.
with the time the machine (512 MO) become slow.
Is there a way to release the memory when closing the form.
Thanks
Jun 27 '08 #3
Are you sure one of the components or variabels of your form are used
outside the form ?
have you implemented the using stament with your form ?
You can always force a GC and retrim the proces working setsize, but if
your objects are not marked for collection this will only degrade the
perfomance of your app . see this thread for the code
http://groups.google.nl/group/micros...90d59018060454
If you can`t find the problem another solution could be to use seperate
application domains as you have the possibility to unload them and this will
give you the resources back .

HTH

Michel

"touf" <to****@hotmail.comschreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
HI,
In my windows application (VB.NET) when I open a form the memory is
increasing but When I close it the memory doen't decrease (task manager).
each time I close the form and re-open it the memory is increasing.
with the time the machine (512 MO) become slow.
Is there a way to release the memory when closing the form.
Thanks

Jun 27 '08 #4

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

Similar topics

5
by: pete | last post by:
Can anyone give me some sugguestions here. Connection is declared at the start of the application Set rsFZReport.ActiveConnection = conn Then a function repeatly opens recordsets like this - ...
2
by: Jarvis | last post by:
I've made a testing program to test the memory usage of some Data Forms. I create a MDI parent form with one single MDI child form, which is a Data Form generated by .NET Data Form Wizard. To...
2
by: JosR | last post by:
I have a memory problem when running a VB.Net application. The application uses a from frmMain from which another form can be opened: Private Sub OpenTheNewForm() dim frm as New frmSecondform...
16
by: Justin Lazanowski | last post by:
Cross posting this question on the recommendation of an I have a .NET application that I am developing in C# I am loading information in from a dataset, and then pushing the dataset to a grid,...
9
by: Mike P | last post by:
I know everything about reference counting and making sure you don't have large objects lying around. I have also profiled my app with multiple tools. I know about the fact GC collects memory but...
3
by: Marc | last post by:
I am using Visual Studio 2003 with .NET Framework 1.x on XP SP2. I am executing the following code (see also http://dturini.blogspot.com/2004/06/on-past-few-days-im-dealing-with-som e.html) ...
11
by: Alex | last post by:
Hello all, I have a main form(say "form1") .i want to display another form(say "form2") on occuring of an event (say a button click) and want to hide it after some time so that it will again...
8
by: jimmarq | last post by:
I have a button click event on my main application window that opens a form. The form has a lot of controls, loads a lot of data, and uses a lot of memory. When I close the form the memory is no...
2
by: mina | last post by:
hi i am using vb.net 2005 to my desktop application. my problem is like this when i am running my project it occupies 100% cpu at 1st form load. then again it release memory upto 95%. when i am...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.