AfxBeginThead leaking or not...
Suppose you are creating a simple multithreaded application in MS visual C/C++ (ver.6), Now please consider the following cases:
A Non-MFC application, where the Thread Function calls one or more C Run-time functions.
According to documentation we should use C Run-time function _beginthread , instead of directly calling WIN API Thread functions, to prevent memory leak. Fine.
The same application now MFC. Thread Function calls one or more C Run-time functions, so donít use WIN API directly. Documentation also says donít use _beginthread on MFC, use AfxBeginThread.
Hmm! Isnít AfxBeginThread is just a wrapper for the CreateThread API function. Does it take care about those memory leak ( calling C Run-times in Thread function, remember) ?
Oh! Iím surely missing something here. What do you guys think?