I start the stream using AfxBeginThread. This returns a pointer to a new object CWinThread.
MSDN states that this pointer is NULL, and it will free everything if thread creation fails. However, as soon as the thread exits after regular startup, the object CWinThreadstill exists. I'm not sure if I should delete the object CWinThread, or if this is done by MFC itself (although this is not the case).
FYI is unlikely that the thread will exit, as it should work until the application terminates. However, since I use it as part of a thread pool, I do not want the CWinThreadaorund to hang forever.
source
share