Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-09-21 13:54:11

From: "David Abrahams" <dave_at_[hidden]>
> #1 shared_ptr<Base> when there's no _accessible_ ~Base, to prevent
> deletion;
> #2 Template parameter being an incomplete type at destruction time;
> #3 Using shared_ptr<void> to retain ownership but strip type information
> (similar to void*);
> #4 Encapsulating allocation details via custom deallocators;
> #5 Passing shared_ptr's across EXE/DLL boundaries that use different
> #2 and #4 both require the addition of the custom deallocator, right?

Hmm. I _think_ that #2 doesn't require a deallocator to be instantiated,
although #5 does.

> Most compilers will do #5 correctly if the destructor is virtual, right?


> BTW, implementation notions:
> 1. Should we think about optimizing away storage for the deleter when it's
> known to be stateless?

We might, although I'm not convinced that it's worth it.

> 2. Should we think about avoiding vtbl bloat a la boost::function?

What does "vtbl bloat" mean?

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