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: segev208@… 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 chris_kohlhoff, 8 years ago

Resolution: invalid
Status: newclosed

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.

comment:2 by Oleg, 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 Oleg, 6 years ago

Resolution: invalid
Status: closedreopened
Note: See TracTickets for help on using tickets.