services

  • Thread starter Thread starter Analizer1
  • Start date Start date
A

Analizer1

i have some services im finishing up
during there operation 24/7
should there be some doevents() so the garbage collector
can do its thing...

Im not sure how all this works
tks
 
Analizer1,

No, once you release the references to the objects you are no longer
using, the GC will act when there is enough memory pressure to warrant it.
 
thank you

Nicholas Paldino said:
Analizer1,

No, once you release the references to the objects you are no longer
using, the GC will act when there is enough memory pressure to warrant it.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Analizer1 said:
i have some services im finishing up
during there operation 24/7
should there be some doevents() so the garbage collector
can do its thing...

Im not sure how all this works
tks
 
I just wanted to add that if you are using any resources like files,
sockets or database connections you'll want to make sure you close them
explicitly instead of waiting for the GC to take care of it.

--
Andrew Faust
andrew[at]andrewfaust.com
http://www.andrewfaust.com


Nicholas Paldino said:
Analizer1,

No, once you release the references to the objects you are no longer
using, the GC will act when there is enough memory pressure to warrant
it.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Analizer1 said:
i have some services im finishing up
during there operation 24/7
should there be some doevents() so the garbage collector
can do its thing...

Im not sure how all this works
tks
 
when each job is complete all items are close, ie sockets, connections, etc
any support classes are nulled
then they wait for next job,
thanks for your response


Andrew Faust said:
I just wanted to add that if you are using any resources like files,
sockets or database connections you'll want to make sure you close them
explicitly instead of waiting for the GC to take care of it.

--
Andrew Faust
andrew[at]andrewfaust.com
http://www.andrewfaust.com


Nicholas Paldino said:
Analizer1,

No, once you release the references to the objects you are no longer
using, the GC will act when there is enough memory pressure to warrant
it.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Analizer1 said:
i have some services im finishing up
during there operation 24/7
should there be some doevents() so the garbage collector
can do its thing...

Im not sure how all this works
tks
 

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

Similar Threads


Back
Top