.NET processes will tend to grow to what looks like an alarmingly large
size unless there is a reason for them to shrink.  The CLR does actually
keep track of the amount of memory being used system-wide, and if other
processes start to demand more memory, the CLR will trigger a garbage
collect in your process, reducing the amount of memory that it is using.

So the large-looking memory consumption isn't usually an issue.  If
anything else in the system starts to need that memory, the CLR will
give it back.

IDispose doesn't have any bearing on this.  IDispose has nothing to do
with memory allocation, it's just about other resources.  The fact that
your memory usage stays constant at 18MB indicates that you're not
leaking resources.

If it was forever creeping upwards, then that would be something to
worry about.  But 18MB is fairly normal.


-- 
Ian Griffiths
DevelopMentor

-----Original Message-----
From: Courtney Smith [mailto:[EMAIL PROTECTED] 

Hello,

I'm taking a stab at windows services for the first
time.  My windows service is written in vb.net (not my
lang of choice but I have to go with the flow of the
department).  It is running a once a day timer that
calls several stored procs and depending on the size
of the returned values(s) sends out emails.

Now for my questions.  Can I expect Windows Services
in .Net to have a considerable memory foot print?  I
check and rechecked the closure of my only dataset and
datareader objects.  I have also set them to nothing
when I have finished using them.  This service is only
called once a day.  When it first started it uses a
woping 7MB of RAM...then on first execution it uses
18MB and this stays constant execution after
execution.

I monitored the size hoping the garbage collector
might help me out but to noavail.  I do not implement
IDispose if that helps.

Reply via email to