I am developing a .NET Windows service that is creating a couple of threads and then uses these threads to send print jobs to printers (there is a thread for each printer). I have some issues which sometimes can be fixed by restarting the service. Some issues also arise when the service has been running for a while. This makes me suspect a possible memory leak. So, a couple of questions:
Would a garbage collector collect an object if it was created inside a thread, or will the object exist until the thread is stopped/terminated?
What tools can I use to monitor the amount of memory used by a Windows service and by a thread that I am starting programmatically?