Boost logo

Boost :

From: Thore Karlsen (sid_at_[hidden])
Date: 2005-07-13 07:48:52


On Tue, 12 Jul 2005 23:50:08 -0400, Gili <cowwoc_at_[hidden]>
wrote:

> If one creates a new boost::thread within DLLMain or a function it
>invokes, CreateThread (invoked by Boost) creates a new thread but does
>not start it. Boost's code then waits on the native thread to start
>before returning from the constructor but because this never occurs it
>blocks forever.

Does boost::thread use CreateThread? Is the author aware of the
potential memory leaks that can result from this?

>From MSDN:

"A thread that uses functions from the static C run-time libraries
should use the _beginthread and _endthread C run-time functions for
thread management rather than CreateThread and ExitThread. Failure to do
so results in small memory leaks when ExitThread is called. Note that
this is not a problem with the C run-time in a DLL."

-- 
Be seeing you.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk