473,395 Members | 1,869 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,395 software developers and data experts.

Memory Query

In Windows, when I minimize an app, its memory usage drops
considerably.

Now, I'm making an app that, when the user closes the main form, the
form hides and a notify icon (system tray icon) appears. When the
form hides, this same memory usage drop *doesn't* happen.

Is there a way to manually do this memory usage drop thing? I'd like
to do this when the form is hidden, after the user chooses to close
it, when the notify icon appears.

I remember reading some time ago about a Windows API function call
that could do this, but cannot remember any details.

Thanks in advance.
Nov 22 '05 #1
1 1159
C# Learner <cs****@learner.here> wrote:
In Windows, when I minimize an app, its memory usage drops
considerably.

Now, I'm making an app that, when the user closes the main form, the
form hides and a notify icon (system tray icon) appears. When the
form hides, this same memory usage drop *doesn't* happen.

Is there a way to manually do this memory usage drop thing? I'd like
to do this when the form is hidden, after the user chooses to close
it, when the notify icon appears.

I remember reading some time ago about a Windows API function call
that could do this, but cannot remember any details.


What you're looking at is the working set, which is a very bad measure
of how much memory an app really takes. Minimising an app shrinks the
working set to 0. You could do that yourself via P/Invoke, but it's
more likely to have a negative performance impact than a positive one.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 22 '05 #2

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

Similar topics

6
by: Ryan | last post by:
Hello, I am having trouble with a production db server that likes to gobble up memory. It seems to be a slow burn (maxing out over about an 18 hour time frame, before pegging both procs on the...
1
by: Antar | last post by:
Hi, I'm kind of a newbie on DB management but I have to deal with a huge DB used for real time operations. I got a temporal table where current data is stored to work with frecuently, and then a...
7
by: Magnus Österberg | last post by:
I am experiencing the following problem; I boot my Windows 2000 sp#4 machine. I check sqlservr.exe's memory usage in Task manager. It is ca 20 mb, everything is OK. Then I run this query; ...
4
by: slaprade | last post by:
I am loading a weeks worth of web logs into a dataset using Imports Microsoft.Data.Odbc These are text - fixed length fields so I have written a schema for them. The adapter fill looks like this...
4
by: Mark Striebeck | last post by:
Hi, we are using Postgres with a J2EE application (JBoss) and get intermittent "out of memory" errors on the Postgres database. We are running on a fairly large Linux server (Dual 3GHz, 2GB Ram)...
5
by: Aaron Birkland | last post by:
I have a long but straightforward query (on some very large tables) that always ends in 'Memory exhausted in AllocSetAlloc(108)'. Even stranger are some messages that appear in the logfile, such...
4
by: Sean Shanny | last post by:
To all, Running into an out of memory error on our data warehouse server. This occurs only with our data from the 'September' section of a large fact table. The exact same query running over...
7
by: Salvador | last post by:
Hi, I am using WMI to gather information about different computers (using win2K and win 2K3), checking common classes and also WMI load balance. My application runs every 1 minute and reports...
1
by: sethwai | last post by:
Hi, We received an SQL 955 on a query. Since a snapshot showed that database wide memory was still available (high water mark was below max) I figured it was the SORTHEAP parm being too small. ...
9
by: Bruno Barberi Gnecco | last post by:
I'm using PHP to run a CLI application. It's a script run by cron that parses some HTML files (with DOM XML), and I ended up using PHP to integrate with the rest of the code that already runs the...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.