If my executable calls dlopen
to load a library but neglects to call dlclose
, the library will stay loaded until the process exits and the OS forces it to unload.
If I load a.so
which loads b.so
, then call dlclose
on a.so
, does the OS unload b.so
as well?
How does this compare with a similar scenario using the Microsoft equivalent, LoadLibraryEx
?
The application need only worry about what the app loads directly. If you load a.so
, all you need to be concerned with is unloading a.so
.
If a.so
refuses to unload b.so
, that is a problem with a.so
, your app is not responsible for this. The author of a.so
needs to get their act together and fix the problem with their library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With