[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ Plugins and virtual destructors.

From: dherring
Subject: Re: C++ Plugins and virtual destructors.
Date: Tue, 13 Nov 2007 10:36:02 -0500 (EST)
User-agent: SquirrelMail/1.4.10a

Ralf Wildenhues wrote:
> * Daniel Herring wrote on Mon, Nov 12, 2007 at 07:46:55AM CET:
>> Here's a relevant post from the GCC list; it mentions how to work around
>> some dlopen difficulties (including RTTI, exceptions, custom
>> new/delete).
> Thanks for this link.  FWIW, I could not easily see why RTLD_NOW should
> be needed.  If it is, there's an opportunity to extend libltdl's advise
> API for this flag.

I don't think RTLD_NOW is strictly needed.  Instead, it forces everything
(including RTTI and exception class constructors) to resolve correctly
before dlopen succeeds.  If you're trying to catch exceptions, its
probably unnerving to get an unresolved symbol error that only occurs when
you try to throw the exception...  Always using dlopen(RTLD_NOW) should
prevent such gotchas.

- Daniel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]