Click here to Skip to main content
15,894,343 members
Home / Discussions / C#
   

C#

 
GeneralRe: Just a thought...why is my application taking so much RAM? Pin
sharpiesharpie18-Feb-07 9:03
sharpiesharpie18-Feb-07 9:03 
GeneralRe: Just a thought...why is my application taking so much RAM? Pin
Judah Gabriel Himango18-Feb-07 9:26
sponsorJudah Gabriel Himango18-Feb-07 9:26 
GeneralRe: Just a thought...why is my application taking so much RAM? Pin
Christian Graus18-Feb-07 11:09
protectorChristian Graus18-Feb-07 11:09 
AnswerRe: Just a thought...why is my application taking so much RAM? Pin
Christian Graus18-Feb-07 9:17
protectorChristian Graus18-Feb-07 9:17 
GeneralRe: Just a thought...why is my application taking so much RAM? Pin
sharpiesharpie18-Feb-07 9:24
sharpiesharpie18-Feb-07 9:24 
GeneralRe: Just a thought...why is my application taking so much RAM? Pin
Christian Graus18-Feb-07 9:58
protectorChristian Graus18-Feb-07 9:58 
GeneralRe: Just a thought...why is my application taking so much RAM? Pin
Dave Kreskowiak18-Feb-07 12:02
mveDave Kreskowiak18-Feb-07 12:02 
AnswerRe: Just a thought...why is my application taking so much RAM? Pin
Scott Dorman18-Feb-07 13:53
professionalScott Dorman18-Feb-07 13:53 
sharpiesharpie wrote:
Every C# application i make takes an excessive amount of RAM


You can't just rely on the "Mem Usage" column in Task Manager to determine this. Every .NET application is handed a bit of a managed memory allocation that is controlled by the .NET runtime (CLR) itself. The Mem Usage column in task manager doesn't know anything about this memory so you're not seeing accurate and reliable results. As other people have pointed out, there are far better ways to determine the actual amount of memory your application is using.

sharpiesharpie wrote:
I release every resource i use by flushing\closing\disposing\making it null and then calling the garbage collector but the app still takes like 17mb RAM...how can i make my program use less memory?


All of this is fine, except for explicitly calling the garbage collector. You really don't want to do that unless you have a very good reason to. The biggest impact you will actually see from doing that is that your applications performance will suffer. Each time the garbage colletor runs, it effectively freezes the main thread of your application so it can determine what objects are still being referenced. You actually hurt performance by making too many GC calls, so it is generally best to let the GC decide on it's own when it should run.

sharpiesharpie wrote:
how can i use an exterior icon in my application, as in not compiling the program with it, but making the program use an exterior ICO file (thereby making it smaller)?.


Not sure what the point for doing this actually is. A typical icon file is small, so embedding it as the main application icon (the normal way of doing things) shouldn't cause an issue.



-----------------------------
In just two days, tomorrow will be yesterday.

QuestionDataBind error with Gridview Pin
BMWABCD18-Feb-07 7:36
BMWABCD18-Feb-07 7:36 
AnswerRe: DataBind error with Gridview Pin
Stefan Troschuetz18-Feb-07 8:05
Stefan Troschuetz18-Feb-07 8:05 
QuestionWebClient DownloadProgressChangedEventHandler not working!! Pin
Rizawn18-Feb-07 6:19
Rizawn18-Feb-07 6:19 
AnswerRe: WebClient DownloadProgressChangedEventHandler not working!! Pin
Stefan Troschuetz18-Feb-07 6:34
Stefan Troschuetz18-Feb-07 6:34 
GeneralRe: WebClient DownloadProgressChangedEventHandler not working!! Pin
Rizawn18-Feb-07 6:41
Rizawn18-Feb-07 6:41 
QuestionHow to set values of two properties in other method Pin
AndrusM18-Feb-07 5:13
AndrusM18-Feb-07 5:13 
AnswerRe: How to set values of two properties in other method Pin
Stefan Troschuetz18-Feb-07 6:55
Stefan Troschuetz18-Feb-07 6:55 
GeneralRe: How to set values of two properties in other method Pin
AndrusM18-Feb-07 12:19
AndrusM18-Feb-07 12:19 
GeneralRe: How to set values of two properties in other method Pin
Stefan Troschuetz18-Feb-07 21:59
Stefan Troschuetz18-Feb-07 21:59 
QuestionSnippet Manager Pin
marvviki18-Feb-07 3:02
marvviki18-Feb-07 3:02 
AnswerRe: Listview with images? Pin
Adi Khan 7918-Feb-07 4:43
Adi Khan 7918-Feb-07 4:43 
Questionprotected and protected internal Pin
amaneet18-Feb-07 1:11
amaneet18-Feb-07 1:11 
AnswerRe: protected and protected internal Pin
Marc Clifton18-Feb-07 3:30
mvaMarc Clifton18-Feb-07 3:30 
Questionhow change input language Pin
Iman Mohsen18-Feb-07 1:07
Iman Mohsen18-Feb-07 1:07 
AnswerRe: how change input language Pin
sharpiesharpie18-Feb-07 1:55
sharpiesharpie18-Feb-07 1:55 
QuestionButton context menu Pin
CodeItWell18-Feb-07 0:50
CodeItWell18-Feb-07 0:50 
AnswerRe: Button context menu Pin
Christian Graus18-Feb-07 10:00
protectorChristian Graus18-Feb-07 10:00 

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.