New shared pointer

Frerich Raabe raabe at kde.org
Sat Sep 10 01:44:54 BST 2005


On Friday 09 September 2005 21:57, Stefan Teleman wrote:
> On Friday 09 September 2005 18:56, Frerich Raabe wrote:
> > > I grabbed Alexandrescu's Modern C++ design, which has a whole chapter
> > > on smart pointers. Would that be an acceptable source of alternate
> > > code?
> >
> > I bet Eva and Simon would like this, but IMHO it's totally over the edge,
> > doing much more than we need.
>
> fwiw, there's a clean and simple implementation of a shared/smart pointer
> in Scott Meyers (second volume iirc). and it takes care of the
> const-correctness problem discussed here about a year ago. :-)

I have all my books in boxes already (I'll move to Hamburg soon) so I cannot 
check myself: isn't the sourcecode which you can see on the very last pages 
of MEC++ actually an auto_ptr implementation? If not, is it really giving you 
explicitely shared semantics? An implicitely shared pointer (like 
QSharedDataPointer) is nice, but quite a hassle because it's perfectly 
possible that a lot of code which uses KSharedPtr actually depends on not 
detaching automatically.

- Frerich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050910/c8f26f83/attachment.sig>


More information about the kde-core-devel mailing list