What is "createthread" !?
If this function does not return the handle it MUST close it internally...
In Win API there is only one Function to create a thread: CreateThread
In Win CRT there are two: beginthread (which does not return the handle)
and beginthreadex (which returns the handle)
Do you need a memory-leak finder ?