I have 2 dlls: A and B.
From a code in dll A, I am loading dynamically the dll B (using dlopen on Unix and LoadLibrary on Windows). Is it guaranteed that B will be unloaded before A?
Is there any difference between Unix and Windows behavior?
I have 2 dlls: A and B.
From a code in dll A, I am loading dynamically the dll B (using dlopen on Unix and LoadLibrary on Windows). Is it guaranteed that B will be unloaded before A?
Is there any difference between Unix and Windows behavior?
There is no guarantee as to which DLL will be unloaded first (Unix and WIndows do not differ on this point).
If you load the dll "B" inside dll "A" manually - which I suppose from your question -, I would assume you unload the dll "B" manually as well.