D17052: Simplify reference counting of FrameData

Aleix Pol Gonzalez noreply at phabricator.kde.org
Thu Nov 22 17:16:54 GMT 2018


apol marked an inline comment as done.
apol added inline comments.

INLINE COMMENTS

> zzag wrote in framesvg.cpp:569
> Do we really need to pass a shared pointer? Wouldn't it better to just pass a raw pointer? We won't do any ownership-related stuff anyway.

It doesn't really make a difference because it's a const& so it doesn't construct a new object (i.e. it doesn't refcount +1 and -1 upon leave).
On the other hand this makes it possible to pass the object we store without calling anything which I see as an advantage.

> zzag wrote in framesvg.cpp:618
> Just newFd->cacheId.

Can't do, QWeakPointer doesn't overload operator->

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D17052

To: apol, #plasma, #frameworks
Cc: mart, zzag, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181122/e5bb680b/attachment.html>


More information about the Kde-frameworks-devel mailing list