The documentation says that a "BeginThread" needs to be followed by a "CloseThread". The implementation of TThread did not respect this yet.

Note: The only RTL where this could lead to problems is for BeOS with the old threading implementation as this does not use "BeginThread" at all (the newer implementation does).

rtl/objpas/classes/classes.inc, TThread.Destroy:
  * call "CloseThread" if the thread handle is valid (mimics the logic of the Windows RTL)
rtl/win/tthread.inc, TThread.SysDestroy:
  * remove the call to "CloseHandle"; this is done by "CloseThread" afterwards


git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@24313 3ad0048d-3df7-0310-abae-a5850022a9f2
 * fcl-fpcunit depends on libtar, fixes compilation after r24312

git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@24314 3ad0048d-3df7-0310-abae-a5850022a9f2