boostorg / dll

Library for comfortable work with DLL and DSO
https://boost.org/libs/dll
52 stars 43 forks source link

Why doesn't shared_library destructor call unload()? #65

Closed db4 closed 1 year ago

db4 commented 1 year ago

Docs suggest that it should:

    /*!
    * Destroys the object by calling `unload()`. If library was loaded multiple times
    * by different instances, the actual DLL/DSO won't be unloaded until
    * there is at least one instance that references the DLL/DSO.
    *
    * \throw Nothing.
    */
    ~shared_library() BOOST_NOEXCEPT {}
apolukhin commented 1 year ago

It does it in base class destructor:

https://github.com/boostorg/dll/blob/482c5b3b033c4480b80def793045d4681b8ab35e/include/boost/dll/detail/posix/shared_library_impl.hpp#L47

db4 commented 1 year ago

Ahh, how could I overlook this... Sorry for the noise!