I don't see any memory leak problem here, and you can close thread handle after creating it, clsong thread handle does not terminate/stop the thread.