I have a Silverlight 3 project. When one of the pages is loaded, a System.Threading.Thread object is created and started. I want to make sure that it terminates when the user navigates away from the page. Will this happen automatically, or do I have to manually terminate the thread in the OnNavigatingFrom event?
Thanks for any help.
The
Threadobject can be destroyed but the process thread it created will continue to run until the method that it originally invoked returns.So if you have some code in some loop that never returns that thread will continue until you do something to interrupt that loop, regardless of what you do with the Thread object that created it. IMO the class
Threadis a bit of a mis-nomer.