Java Multi-Threading Question: Download Java Multi-Threading PDF

What is Thread leak?

Tweet Share WhatsApp

Answer:

Thread leak is when application does not release references of the thread object and those threads do not get garbage collected.
Number of such unused threads increases with time and it can cause issues in the application like long response time.

To overcome this problem we can do the following

1. By maintaining a log for all entry and exit point of thread.
2. Check how the new thread is created and how it is closed.
3. By using exception handling etc.

Download Java Multi-Threading PDF Read All 36 Java Multi-Threading Questions
Previous QuestionNext Question
What is daemon thread and how it differs from user thread?Explain the method of Thread class with example?