New shared pointer - revision 2

Thiago Macieira thiago at kde.org
Sat Sep 10 04:53:39 BST 2005


Frerich Raabe wrote:
>template <class T>
>KSharedPtr<T>::KSharedPtr( const KSharedPtr<T> &other )
>{
>        KSharedData *x = other.d;
>        x = qAtomicSetPtr( &d, x );
>        d->ref.ref();
>}

Perfect. Even better than what I had suggested. :-)

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

5. Swa he géanhwearf tó timbran, and hwonne he cóm, lá! Unix cwæð "Hello, 
World". Ǽfre ǽghwilc wæs glæd and seo woruld wæs fréo.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050910/f5667409/attachment.sig>


More information about the kde-core-devel mailing list