Garbage Collection is a daemon thread in java.
I have a great confusion, Is Garbage Collection also a thread in Dot net ??
Garbage Collection is a daemon thread in java. I have a great confusion, Is
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The garbage collector isn’t “a thread” in either .NET or Java. On both platforms another thread is (or possibly multiple threads are) used by the garbage collector – to run finalizers on, for example. The actual garbage collection could be executed on separate threads, too. But that doesn’t mean that the garbage collector is a daemon thread, any more than a web server is a thread.
(If you were just wanting to know whether the garbage collector in .NET required at least one thread in addition to any threads that your application creates, the answer is yes… but you need to be clear in your mind about what exactly you’re interested in.)