From: Rogier van Dalen (R.C.van.Dalen_at_[hidden])
Date: 2003-12-31 09:33:38
First of all, I'm not sure this is the correct place to discuss this.
Please point me to a better place if it's not.
"A proposal to add general purpose smart pointers to the library"
is based mostly on the boost shared_ptr. It explicitly allows a
reference-linked implementation though (III.A.4). Why? According to
Andrei Alexandrescu (Modern C++ Design 7.5) the only advantage of that
is that no extra object (reference counter) has to be allocated. I have
not been able to think of or find any other advantage.
But what to do with the deleter then, whose type is not in the
shared_ptr template parameter list? There must be something I'm missing,
or otherwise a linked list implementation of shared_ptr is forced to
allocate at least some free store for the deleter (or a vtable) --
rendering the advantage void.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk