Boost logo

Boost :

From: AlisdairM (alisdair.meredith_at_[hidden])
Date: 2003-12-11 04:50:28

AlisdairM <alisdair.meredith_at_[hidden]> wrote in

> Not sure this is actually useful though, as I'm sure the shared_ptr
> overhead is more than the cost of adding a virtual destructor ;¬ )

Actually I take that back. This will be useful when adapting a library
outside your control.

For instance, BCB6 finally allows multiple inheritence with VCL classes, so
long an non-VCL bases are 'interface' classes, structs of nothing but pure
virtual functions.
If you want to add a virtual destructor, you need to use a Borland
extension, the __fastcall calling convention. This trick gives a
workaround. (although the automatic destructor is public in this case)

I suspect there are many other libraries out there with similar


Boost list run by bdawes at, gregod at, cpdaniel at, john at