Hello Brendon, * Brendon Costa wrote on Fri, Nov 09, 2007 at 03:20:27AM CET: > > Is using virtual destructors fine with a C++ plugin interface?
Good question. > I have an example below that works. Means you've got it to work with which set of compilers on what list of systems? > However i am not sure if it is a > good practice. In particular is it ok to make use of virtual > destructors in an application to destroy an object allocated in the > plugin or should I define a pure virtual Destroy() method to ensure > that the actual memory de-allocation (call to delete) is performed in > the plugin where it was also initially allocated? I don't know either. But if it helps you, we can put your example in the Libtool HEAD testsuite, to get some test exposure. It should be removed of the GCC attributes, the iostream dependency, and use old-style casts (the last two are merely to avoid bogus errors on pre-iso C++ compilers). Cheers, Ralf _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool