[Telepathy] [Fwd: tp-qt4 qsharedpointer usage]

Kenneth Rohde Christiansen kenneth.christiansen at gmail.com
Wed Mar 18 09:51:10 PDT 2009


Maybe it is interesting for you to look at the WebKit smart pointers. There
is a document explaining them here:

http://webkit.org/coding/RefPtr.html

RefPtr is like more or less like an optimized QExplictlySharedDataPointer,
and RefCounted is like QSharedData.

Kenneth

On Wed, Mar 18, 2009 at 12:33 PM, Andre Moreira Magalhaes <
andre.magalhaes at collabora.co.uk> wrote:

> Ian Monroe wrote:
> > I wrote a bug about the issue last month:
> > https://bugs.freedesktop.org/show_bug.cgi?id=20299
> >
> > Like I said in the bug report, using KSharedPtr would allow us to always
> > return a KSharedPtr since the counting occurs in the object itself (via
> > QSharedPointer), instead of an external pointer type.
> >
> > I think (but am not positive) that KSharedPtr is the same thing as
> > QExplictlySharedDataPointer, just without a detach call. So we could use
> > QExplictlySharedDataPointer and ignore detach.
> >
> Hmm nice, it seems QExplicitlySharedDataPointer fits the purpose, I will
> try it
>
> BR
>
> _______________________________________________
> telepathy mailing list
> telepathy at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/telepathy
>



-- 
Kenneth Rohde Christiansen
http://kenneth.christiansen.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/telepathy/attachments/20090318/a0f9c777/attachment.htm 


More information about the telepathy mailing list