I am using following single threaded appartment. I am unable to reclaim memory/other resources from thread object. Actullay I want to wrap my thread in try catch and fianlly block. try and catch are done. But I am unsure about finally block. What code, property or function do I need to call in finally block.
System.Threading.Thread myThread = null;
try
{
myThread = new System.Threading.Thread(functionAddressETC)
myThread .SetApartmentState(System.Threading.ApartmentState.STA);
myThread .Start();
myThread .Join();
}
catch(Exception ex)
{}
finally
{
// I need help in finally block. I need to reclaim all my resources
//what function do i need to call here??????
}