Erik Hofman wrote:
> Since FlightGear is linked to libGL at link time, the number of
> dlclose calls would always be one less than the number of dlopen
> calls.

In which case the dlclose() is 100% guaranteed to be a noop anyway and
can be safely removed. :)

Seriously: consider the case where this symbol came out of a library
that we *don't* link to statically.  Then this would undeniably be a
bug, because the library would be unmapped before the function could
be called.  Honestly, this code is just wrong.  You don't close the
library before calling functions in it, you just don't.  Yes, the
POSIX docs for dlclose() seem to imply that it should be "safe" as
long as something else has a handle to libGL, but it's still not
correct.

Andy


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to