High Memory Usage ... dont know whats the problem

D

Dan K.

Hi NG,

first of all i am new to OOP and C# so maybe thats my whole problem :)
i wrote a small timer application, like i did if i was starting with
programming in vb long time ago. the vb application (few years old)
has memory usage around 7.000 K ... my new written C# Application
around 18.000 K. after few operations like minimize to tray and then
reactivate form memory usage rises higher ... i tried to integrate
things like GarbageCollector and turn off things but that didnt´t
solve the problem.

Maybe there is someone out there who could take a look at my source (i
will mail it because i cant upload things from my current workplace)
and tell me what i´ve done wrong. would be sweet :) so send me a mail
or write down your adress here.

greetings dan
 
W

Wojciech Trelak

Which version of the .NET do you have?

Older versions had a problem with GC, which has been solved in the latest
one (v1.1, I suppose). And yes - 18MB is normal.
 
D

Dan K.

thanks for your replies ... yes its the 1.1 version ;(

My Problem is not only the 18mb usage.the increasing memory usage
during the application runtime is the major thing. only small steps of
4-12K of memory but constant ... the value of increasing is different
from the action the application process. if you minimize the app in
systry the memory usage increases by 4 K .. if you hit the icon and
the form returns increase by 12 K ... any idea how to solve this ?
 
V

Vijaye Raji

In most practical applications, you wouldn't have to worry about such
increases. Depending on your process, any memory allocation can happen in
4k chunks. However, in .Net, the garbage collector will kick in when you
run out of memory or when it decides it's time to. So, you are fine.

Just out of curiosity - what kind of app are you writing that requires such
aggressive memory management?

vJ
 

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