Click here to Skip to main content
15,888,521 members
Home / Discussions / C#
   

C#

 
AnswerRe: Loading Files Pin
User 66584-Nov-05 7:32
User 66584-Nov-05 7:32 
GeneralRe: Loading Files Pin
zaboboa4-Nov-05 8:13
zaboboa4-Nov-05 8:13 
AnswerRe: Loading Files Pin
whizzs4-Nov-05 7:37
whizzs4-Nov-05 7:37 
AnswerRe: Loading Files Pin
Jon Rista4-Nov-05 16:16
Jon Rista4-Nov-05 16:16 
Questionget GC to collect unused memory Pin
Stefan Fohringer4-Nov-05 5:06
Stefan Fohringer4-Nov-05 5:06 
AnswerRe: get GC to collect unused memory Pin
Dan Neely4-Nov-05 5:32
Dan Neely4-Nov-05 5:32 
AnswerRe: get GC to collect unused memory Pin
Dave Kreskowiak4-Nov-05 5:52
mveDave Kreskowiak4-Nov-05 5:52 
GeneralRe: get GC to collect unused memory Pin
Jon Rista4-Nov-05 16:33
Jon Rista4-Nov-05 16:33 
There are Win32 API calls you can call through PInvoke that will force windows to reclaim the memory that GC has reserved. There is something called "working set" that windows uses to manage memory usage for standard windows apps (primarily, those with a window...vs. a windows service for example. A quick test you can run is to check your apps memory usage when its a window, and check again after minimizing it...most probably, you'll see a change in memory usage, sometimes a significant change). You can force your application to free memory down to its minimum working set size, and you will see a change in your apps memory usage in Task Manager. Just be forwarned, this is NOT RECOMMENDED. As has already been mentioned, the GC tries to keep as much memory in reserve as it can for performance reasons. The GC is also a highly intelligent piece of code, and it will behave differently on different systems, and even on the same system in different conditions. Trying to "force the issue" in regards to freeing memory usually results in a loss, overall, in one way or another. Ultimately, the GC knows best, and you should let it do what it does.

-- modified at 22:34 Friday 4th November, 2005

Oops, replied to the wrong one. Apologies. Poke tongue | ;-P
GeneralRe: get GC to collect unused memory Pin
Dave Kreskowiak5-Nov-05 2:49
mveDave Kreskowiak5-Nov-05 2:49 
GeneralRe: get GC to collect unused memory Pin
Jon Rista5-Nov-05 9:57
Jon Rista5-Nov-05 9:57 
QuestionMost elegant way to query 400 computers in C#? Pin
artisticcheese4-Nov-05 4:44
artisticcheese4-Nov-05 4:44 
AnswerRe: Most elegant way to query 400 computers in C#? Pin
Rob Graham4-Nov-05 5:14
Rob Graham4-Nov-05 5:14 
GeneralRe: Most elegant way to query 400 computers in C#? Pin
artisticcheese4-Nov-05 5:17
artisticcheese4-Nov-05 5:17 
AnswerRe: Most elegant way to query 400 computers in C#? Pin
S. Senthil Kumar4-Nov-05 21:39
S. Senthil Kumar4-Nov-05 21:39 
GeneralRe: Most elegant way to query 400 computers in C#? Pin
artisticcheese5-Nov-05 2:31
artisticcheese5-Nov-05 2:31 
GeneralRe: Most elegant way to query 400 computers in C#? Pin
S. Senthil Kumar5-Nov-05 3:17
S. Senthil Kumar5-Nov-05 3:17 
QuestionRemoting - recovering communication Pin
duff794-Nov-05 4:37
duff794-Nov-05 4:37 
QuestionAny good C# 2.0 books out yet? Pin
Ed K4-Nov-05 3:46
Ed K4-Nov-05 3:46 
QuestionUnTrapping of Mouse Events Pin
wheelerbarry4-Nov-05 3:38
wheelerbarry4-Nov-05 3:38 
AnswerRe: UnTrapping of Mouse Events Pin
Dave Kreskowiak4-Nov-05 5:47
mveDave Kreskowiak4-Nov-05 5:47 
QuestionRichtextbox Pin
PaulaM4-Nov-05 2:38
PaulaM4-Nov-05 2:38 
AnswerRe: Richtextbox Pin
mav.northwind4-Nov-05 2:49
mav.northwind4-Nov-05 2:49 
QuestionHTTP Protocols C# Pin
TAREQ F ABUZUHRI4-Nov-05 1:29
TAREQ F ABUZUHRI4-Nov-05 1:29 
AnswerRe: HTTP Protocols C# Pin
S. Senthil Kumar4-Nov-05 3:34
S. Senthil Kumar4-Nov-05 3:34 
AnswerRe: HTTP Protocols C# Pin
Ed K4-Nov-05 3:51
Ed K4-Nov-05 3:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.