Re: Wyciek pamięci podczas kasowania wątku

Autor: Matuzalem <codemaster__at_op.pl>
Data: Sat 28 Oct 2006 - 14:47:41 MET DST
Message-ID: <1162039661.391076.10900@b28g2000cwb.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-2"

radarek napisał(a):
> "Matuzalem" <codemaster_@op.pl> wrote in message
> news:1162036995.258271.57990@k70g2000cwa.googlegroups.com...
> >Ciekawe bo _beginthreadex()/_endthreadex().i tak po skompilowaniu
> >odwołują się do CreateThread()/ExitThread(), ale możliwe, że za
> >wyciek pamięci odpowiada kompilator, ale napewno nie MS Visual Studio
> >(mam na myśli wszystkie > 6.0, a już o 8.0 nie wspominam). Dziwne
> >stwierdzenie, że należy używać _beginthreadex()/_endthreadex() na
> >jakiej podstawie tak twierdzi, tym bardziej - jak już pisałem - że
> >one i tak odwołują się bezpośrednio do
> >CreateThread()/ExitThread()...?
>
> To wynika z uzycia CRT, stad mozliwe wycieki jesli sie uzyje golych api.

MSDN:
"Note Starting in Visual C++ 2005, LIBCP.LIB and LIBCPD.LIB (via the
old /ML and /MLd options) have been removed. Use LIBCPMT.LIB and
LIBCPMTD.LIB instead via the /MT and /MTd options.

When you build a release version of your project, one of the basic C
run-time libraries (LIBCMT.LIB, MSVCMRT.LIB, MSVCRT.LIB) is linked by
default, depending on the compiler option you choose (multithreaded,
DLL, /clr). If you include one of the Standard C++ Library Header Files
in your code, a Standard C++ Library will be linked in automatically by
Visual C++ at compile time."

Pozdrawiam
Received on Sat Oct 28 14:50:09 2006

To archiwum zostało wygenerowane przez hypermail 2.1.8 : Sat 28 Oct 2006 - 15:42:04 MET DST