jedisct1 / libsodium

A modern, portable, easy to use crypto library.
https://libsodium.org
Other
12.07k stars 1.72k forks source link

Delete critical section on DLL_PROCESS_DETACH #1058

Closed cmb69 closed 3 years ago

cmb69 commented 3 years ago

To explicitly release all allocated resources on shutdown on Windows, we delete the critical section on DLL_PROCESS_DETACH. We do not employ any locking to avoid any potential deadlock. In case of normal DLL unloading there is no need to, and in case of forced unloading all bets are likely off anyway.

cmb69 commented 3 years ago

Thank you!