title: Kill a running thread
body: <p>What happens if we forcefully kill a running thread</p>
  
  <p>I have a thread namely <code>RecordThread()</code> which calls some complex and time consuming functions. In these functions I am using <em>try-catch</em> blocks, allocating and deallocation memory and using critical section variables etc.</p>
  
  <p>like</p>
  
  <pre><code>  void RecordThread()
    {
      AddRecord();
      FindRecord();
      DeleteRecord();
      // ...
      ExitThread(0);
     } 
  </code></pre>
  
  <p>After creating this thread, I am immediately killing it before the thread completes its execution. In this case what happens if the thread is forcefully killed? Do the internal functions (<code>AddRecord</code>, <code>DeleteRecord</code>) complete their execution after we killed the thread?</p>