.NET Application does not release memory until minimized

B

Brian

Hello,

We have a local .NET application running against a local MSDE database.
When the application is checking out data from the local MSDE SQL Server
the procesor spikes, and the memory continues to grow. Once the application
data is loaded from SQL into memory the application stays peaked at 300+MB.
It will never reduce from this size (even over 20 minutes or so) until the
application is minimized and then maximized. At this point the application
resets to it's initial memory size and the available memory slowly creeps
back to a normal level.

This is causing all sorts of miscellaneous program errors because memory
is tied up and not being freed again. Any ideas on how to get the .NET Applicaition
to give back the memory it is not using?

We're using .NET Framework 1.1, Visual Studio VB.NET 2003, MSDE 2000 with
SP3a, on Windows XP SP1 and Windows 2000 Professional SP3 (same behavior
on both Operating Systems).

Thanks,
Bria
 
N

Norman Yuan

Memory usage being dropped if an app's window geting minimized is a standard
Window OS behaviour, not .NET app problem. Window applications written in
all languages (VB, VC++, .NET languages) all behave the same way in this
regard. This is just a Windows OS feature. If your app uses too much memory
and causes trouble, you should consider either add more physical memory or
re-think your app's design (I'd consider your app loading 300MB memory is a
bit too much, if it is just a regular database app).
 
M

Marc Bernard

Brian said:
Hello,

We have a local .NET application running against a local MSDE database.
When the application is checking out data from the local MSDE SQL Server
the procesor spikes, and the memory continues to grow. Once the
application data is loaded from SQL into memory the application stays
peaked at 300+MB. It will never reduce from this size (even over 20
minutes or so) until the application is minimized and then maximized. At
this point the application resets to it's initial memory size and the
available memory slowly creeps back to a normal level.

This is causing all sorts of miscellaneous program errors because memory
is tied up and not being freed again. Any ideas on how to get the .NET
Applicaition to give back the memory it is not using?

We're using .NET Framework 1.1, Visual Studio VB.NET 2003, MSDE 2000 with
SP3a, on Windows XP SP1 and Windows 2000 Professional SP3 (same behavior
on both Operating Systems).

Give this a read:

http://www.devcity.net/newsletter/archive/devcity/devcity20030928.htm#ni080

Marc
 

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