Is there a load leak if dlopen () is called from the dlopen'd library?

If my executable calls dlopen to load the library, but neglects the dlclose call, the library will remain loaded until the process terminates and the OS forces it to unload.

If I download a.so , which loads b.so , and then calls dlclose on a.so , a.so OS also b.so ?

How to compare this with a similar scenario using the equivalent of Microsoft, LoadLibraryEx ?

+6
source share
1 answer

An application only needs to worry about what the application downloads directly. If you download a.so , all you need is unload a.so

If a.so refuses to unload b.so , this is a problem with a.so , your application is not responsible for this. The author of a.so needs to combine their actions and fix the problem with their library.

+3
source

Source: https://habr.com/ru/post/981018/


All Articles