Opened 9 years ago
Last modified 6 years ago
#9059 reopened Bugs
Boost.Asio detail/impl/win_static_mutex leaks a CRITICAL_SECTION
| Reported by: | Owned by: | chris_kohlhoff | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | asio |
| Version: | Boost 1.54.0 | Severity: | Problem |
| Keywords: | asio leak windows | Cc: |
Description
A CRITICAL_SECTION is not some POD type. It needs to be freed using DeleteCriticalSection or it will leak resources.
This leak has been found using Microsoft's Application Verifier.
Change History (3)
comment:1 by , 8 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
comment:2 by , 6 years ago
and what to do if boost is used statically in DLL? After DLL will be unloaded - CRITICAL_SECTION will leak...
comment:3 by , 6 years ago
| Resolution: | invalid |
|---|---|
| Status: | closed → reopened |
Note:
See TracTickets
for help on using tickets.

This is deliberate. A static_mutex is intended to remain valid until program exit, when it will be cleaned up automatically by the operating system.