On 03/20/2011 05:23 AM, Lothar wrote: > > It seems, the shared library did not have a _fini. How can I see that with nm?
I don't believe _fini gets called on Mac OS X when libraries are unloaded. Use __attribute__((destructor)) to mark functions that should be called on unload instead. > > It seems that the library did not really get unloaded by dlclose. How can I > find the cause of it? > > I see the _ini function of that problematic library telling me it gets > called, thus I assume _fini is also present (I declare them in the same > macro). > > Thus my last question: > > When I call dlopen twice, do I get two handles to be kept by my code or do I > get always the same reference? You should get the same reference. On 10.6 and later dyld keeps a refcount and will unload the library when it reaches 0. See the dlclose(3) man page. Peter ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Fink-users mailing list Fink-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-users