Opened 11 years ago
Closed 11 years ago
#5839 closed Bugs (fixed)
thread.cpp: ThreadProxy leaks on exceptions
| Reported by: | Owned by: | viboes | |
|---|---|---|---|
| Milestone: | Boost 1.49.0 | Component: | thread | 
| Version: | Boost 1.47.0 | Severity: | Problem | 
| Keywords: | Cc: | viboes | 
Description
If something goes wrong in ThreadProxy (such as fetching the return value), the ThreadProxyData could be leaked.
DWORD WINAPI ThreadProxy(LPVOID args)
{
    ThreadProxyData* data=reinterpret_cast<ThreadProxyData*>(args);
    DWORD ret=data->start_address_(data->arglist_);
    delete data;
    return ret;
}
      Change History (5)
comment:1 by , 11 years ago
| Component: | None → thread | 
|---|---|
| Owner: | set to | 
comment:2 by , 11 years ago
| Cc: | added | 
|---|---|
| Owner: | changed from to | 
| Status: | new → assigned | 
comment:3 by , 11 years ago
Oh, I see now. The use function can throw :(
I will try to take care of this soon.
comment:5 by , 11 years ago
| Resolution: | → fixed | 
|---|---|
| Status: | assigned → closed | 
Committed in release at #76345
  Note:
 See   TracTickets
 for help on using tickets.
    

Where exactly is the memory leak?