Memory release after form close

T

touf

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
 
C

Cor Ligthert[MVP]

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
 
M

Michel Posseth [MCP]

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/micro...chel+setprocesworkingsetsize#3490d59018060454


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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top