可以用configure选项“no-pinshared”来disable这个特性,不过vcpkg编译的版本,貌似没disable这个特性。
被pin住的dll,没法用FreeLibrary()之类的释放掉。
no-pinshared
Don't pin the shared libraries.
By default OpenSSL will attempt to stay in memory until the process exits. This is so that libcrypto and libssl can be properly cleaned up automatically via an atexit() handler. The handler is registered by libcrypto and cleans up both libraries. On some platforms the atexit() handler will run on unload of libcrypto (if it has been dynamically loaded) rather than at process exit. This option can be used to stop OpenSSL from attempting to stay in memory until the process exits. This could lead to crashes if either libcrypto or libssl have already been unloaded at the point that the atexit handler is invoked, e.g. on a platform which calls atexit() on unload of the library, and libssl is unloaded before libcrypto then a crash is likely to happen. Applications can suppress running of the atexit() handler at run time by using the OPENSSL_INIT_NO_ATEXIT option to OPENSSL_init_crypto(). See the man page for it for further details.
https://github.com/openssl/openssl/blob/master/INSTALL.md
--
FROM 222.130.137.*