?
Solved

Windows Service Cleanup

Posted on 2007-10-05
5
Medium Priority
?
199 Views
Last Modified: 2010-04-23
I wrote a vb.net windows service that produces a flat file from serveral database locations. The service runs continuously and the event is triggered by a day and time. Can anyone help shed some light on how to cleanup after the services run is complete?
0
Comment
Question by:jfsedlar3rd
  • 3
  • 2
5 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 20021245
>> Can anyone help shed some light on how to cleanup after the services run is complete?

What exactly do you mean ? What do you need to cleanup ?
0
 

Author Comment

by:jfsedlar3rd
ID: 20021312
Memory consumption stays at about 42,000 kb long after the service has performed its task. I let it sit overnight and the garbage collector had done nothing with it.
0
 
LVL 53

Accepted Solution

by:
Dhaest earned 2000 total points
ID: 20021322
Are you sure that you close all your database connections, dispose all your objects in your code ?
0
 

Author Comment

by:jfsedlar3rd
ID: 20021521
I am pretty sure about the Database connections. However I am not so sure about my objects. Should I bet setting my variables to Nothing after I am done with them?
0
 
LVL 53

Assisted Solution

by:Dhaest
Dhaest earned 2000 total points
ID: 20021546
I would do so. In that case the objects will be removed from the memory by the garbage collector. Otherwise you have the risk that you keep fe a dataset into your memory with x-number of records
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Integration Management Part 2

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question