End thread

S

Sylfelin

Hello,

I start a very long process in thread.
When function is ending (very long process is finish), i leave thne
function and thread.

In this case, that becomes the thread ?

It is automatically destroyed and memory released in the next garbage
collector ?

Thank's
 
J

Jon Skeet [C# MVP]

I start a very long process in thread.
When function is ending (very long process is finish), i leave thne
function and thread.

In this case, that becomes the thread ?

It is automatically destroyed and memory released in the next garbage
collector ?

If it's a manually created thread, then yes the thread will die when
the task is completed. For a thread-pool thread, the thread will live
on for the next task.

Jon
 

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

Top