C# applications and memory

  • Thread starter Thread starter Kot Behemot
  • Start date Start date
K

Kot Behemot

Hello

I have written so far several little applications in C# which do some
stuff. Nothing spectacular. EXE files are anywhere between 30 and 50KB.

Everything worked perfectly fine until I checked how much memory space
these applications take over. And, well, it is anywhere from 17MB to 24MB.

Could anyone explain to me this phenomenon? What should I do to fix this?

Thanks,
Kot
 
I think the applicatin does not really take over so much memory as you see.
First you can simply minimize your form and you will find it only take over
less than 100K memory,and when you restore the form,you will find it only
take over about 2M memory now.
As you know ,.net use GC to collect the memory that not use,and when GC find
the system memory is not enough for use,it will collect the memory.why you
find your application occupy 17M-24M memory is because the GC did not
collect the memory,because it thinks the free memory is enougth for use,and
need not to collect.
It is my point of view.
 
There is a little more to it than that. I suggest you search in Google
Groups for this topic and read some of the past posts from this group.
 
Back
Top