Boost C++ Libraries: Ticket #5826: threads.cpp: resource leak on threads creation failure https://svn.boost.org/trac10/ticket/5826 <p> There's a number of reasons a thread might fail to be created, especially on Windows CE. For example, specifying a <a class="missing wiki">SecurityAttributes</a> structure or creating more than ~20 threads will result in thread creation failure. </p> <p> Index: thread.cpp =================================================================== RCS file: /cvsroot/boost/boost/libs/thread/src/thread.cpp,v retrieving revision 1.25 diff -<a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">r1</a>.25 thread.cpp 57a58 </p> <blockquote class="citation"> <blockquote> <p> <a class="missing wiki">ThreadProxyData</a>* data = new <a class="missing wiki">ThreadProxyData</a>(start_address,arglist); </p> </blockquote> </blockquote> <p> 59,60c60,65 &lt; new <a class="missing wiki">ThreadProxyData</a>(start_address,arglist),initflag,&amp;threadID); &lt; if (hthread!=0) --- </p> <blockquote class="citation"> <blockquote> <p> data,initflag,&amp;threadID); </p> </blockquote> <blockquote> <p> if (hthread==0) { </p> <blockquote> <p> delete data; return 0; </p> </blockquote> <p> } if (thrdaddr!=0) </p> </blockquote> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5826 Trac 1.4.3 Jeffrey Walton <noloader@…> Wed, 31 Aug 2011 00:33:21 GMT component changed; owner set https://svn.boost.org/trac10/ticket/5826#comment:1 https://svn.boost.org/trac10/ticket/5826#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Anthony Williams</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">thread</span> </li> </ul> Ticket viboes Wed, 07 Dec 2011 00:50:21 GMT <link>https://svn.boost.org/trac10/ticket/5826#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/5826#comment:2</guid> <description> <p> I will take care of it soon. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sat, 10 Dec 2011 11:06:17 GMT</pubDate> <title>owner, status, milestone changed https://svn.boost.org/trac10/ticket/5826#comment:3 https://svn.boost.org/trac10/ticket/5826#comment:3 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.49.0</span> </li> </ul> <p> Committed in trunk at <a class="missing ticket">#75860</a> </p> Ticket viboes Sat, 07 Jan 2012 22:46:26 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/5826#comment:4 https://svn.boost.org/trac10/ticket/5826#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Committed in release at <a class="missing ticket">#76345</a> </p> Ticket