This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dlclose() with zero references does not call library destructor


On Tuesday 02 of April 2013 22:31:15 charles quarra wrote:
> Hi,
> 
> All those debug logs show that each time i call dlclose the status
> result is zero. Success!
> 
> (...)
> Is this a bug or a simple misunderstanding from my part?

i think that dtors will be called during library unload and unload may be performed later.

dlopen manual:

   dlclose
       The  function dlclose() decrements the reference count on the dynamic library handle handle.
       If the reference count drops to zero and no other loaded libraries use symbols in it,
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       then the dynamic library is unloaded.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]