Strange behaviour: Memory consumed reduces if a Form is minimised and again shown

J

Jack Wright

Dear All,
We have observed a very strange behavoiour...when an .net
application is launched that contains a Form...the memory consumed is
around 6-7MB...then if we minimise it and again make it normal the
memory consumption goes down to around 1.xx mb...is this a known issue
in .net 1.0? What can be the reason?

Please advice...

TALIA

Many Regards
Jack
 
H

Herfried K. Wagner [MVP]

* (e-mail address removed) (Jack Wright) scripsit:
We have observed a very strange behavoiour...when an .net
application is launched that contains a Form...the memory consumed is
around 6-7MB...then if we minimise it and again make it normal the
memory consumption goes down to around 1.xx mb...is this a known issue
in .net 1.0? What can be the reason?

The behavior caused by calling this function is not specific to .NET
applications only. It is a feature of the Windows/Explorer shell.

If an application is minimized, Windows removes the working set memory from
the application by calling the Win32 function 'SetProcessWorkingSetSize':

<URL:http://msdn.microsoft.com/library/en-us/dllproc/base/setprocessworkingsetsize.asp>

Windows supposes that minimized applications will not be used for some time
and this memory will be made available to other processes.

When restoring the window the application gets the memory back:

<URL:http://support.microsoft.com/?kbid=293215>

This behavior is by design and it doesn't make sense to worry about it.
 

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