[so] ExitProcess vs. exit pe Windows

Catalin Iacob iacobcatalin at gmail.com
Thu Mar 18 15:51:35 EET 2010


2010/3/18 Lucian Adrian Grijincu <lucian.grijincu at gmail.com>:
> Salut,
...
> ExitProcess (http://msdn.microsoft.com/en-us/library/ms682658(VS.85).aspx)
> face multe, dar nu se ocupă de eliberarea resurselor bibliotecii
> standard C.

Salut si de la mine,

Apropo de Win32 API vs. functiile din C run-time, nici CreateThread nu
ar trebui folosit in programele care folosesc C run-time. MSDN spune
la pagina lui CreateThread
(http://msdn.microsoft.com/en-us/library/ms682453%28VS.85%29.aspx):

A thread in an executable that calls the C run-time library (CRT)
should use the _beginthreadex  and _endthreadex  functions for thread
management rather than CreateThread and ExitThread; this requires the
use of the multi-threaded version of the CRT. If a thread created
using CreateThread calls the CRT, the CRT may terminate the process in
low-memory conditions.

Din punctul asta de vedere, laboratorul 8 nu-i chiar corect.

Catalin


More information about the so mailing list